104 Posted Topics
Re: I don't know if your first "solution" will be possible or not... But I do know that there is a method of the File class called "lastModified()". The lastModiied method returns a long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, … | |
Hi there, I understand that this question might be better off in "hardwareAndSoftware/LinuxAndUnix/LinuxApplicationsAndSoftware". But the truth is, that it takes for ever for someone to respond to posts there, because I don't think anybody visits that forum alot. Anyways, back to the point... I'm trying to install the Java 1.6 … | |
Hi there guys, I would just like to know how I would go about by searching through a <select> list in an HTML page? I assume one would use JavaScript for something like this. On the HTML page there's a textbox which the user can type in a keyword, and … | |
Hello there, I have a JSP page that has a couple of images in, when I type the address of the JSP directly in my browser the page loads, with images and all. But when I go the page, through my servlet [RequestDispatcher.forward()] the page loads but the images are … | |
Hey there guys! Since it's that time of the year, most people are just sitting at their desks, business is dead and you bored out your skull (Unless ofcourse you have a [B]real[/B] job). So I thought, hey, I've got a phone with all this extra crap on including games, … | |
Hello there, This is just a quick question. You know that servlets respond by printing out dynamic HTML code? Well, is it possible that instead of doing that, the servlet just redirects back to the HTML form that send the servlet the Form data in the first place? myHtml(sends form … | |
Hello there, I am trying to access Array elements in another class within my JSP and then parsing them into <select> tags. I'm getting 2 errors though stating that it cannot find the class "PopulateMainScr". Here is my PopulateMainScr class: [CODE] package ContactKeeper; import java.io.*; import java.sql.*; import java.util.*; public … | |
I'm busy working with servlets now and when I try and compile them, I get erorrs stating that it can't find javax.servlet etc. Getting errors where I do the import statements to them. So apparently I have to add that servlet.jar file to the CLASSPATH? And that file can be … | |
Re: Or you can use an ArrayList and convert it to an array.. | |
Helew! I just wana know if someone might have an idea of how I can go about doing this: So attached I have a little example I whiped up. Say you have 3 buttons, button1, button2, button3. What I wana do, is when you click [B]button1[/B], it will magicly turn … | |
Re: Hey man, You posted this in the wrong forum (sure JSP is Java still though). But go to the forum under "Web Development > JSP", you'll get your answers there faster. Cheers, | |
Re: Whow, your question is either very vague/messed-up or I'm going mad.. Let me just make sure what you mean here, you want this method, to [B]Create a file[/B] with the name of the String that has been passed as the arguments for the method? OR Do you want to just … | |
Re: By saying you want to 'block it' do you mean you want to disable all the buttons, textboxes etc in your mainFrame or do you just want to make it invisible? | |
Re: What I like to do while taking on a new project is drawing out exactly how my program wil work, as in using flow chart for my logic flow, since it should use OOP concepts, draw out the classes/object you are going to create, how they are going to interact … | |
Re: Your string can only contain digits or start with a "-" otherwise a NumberFormatException is bound to be thrown... | |
Re: Here's actualy a nice link to some free/online Programming ebooks. SNIP Hope you guys find this helpfull! | |
Hi there, I thought this is probably the best forum to ask my question. I wanted to know, say you have like 5GB of data that you can use, supplied by your service provider each month. And say you have something like, 3 users connected to your line. Is there … | |
Because 90% of the threads in here is almost exact copies of the ones on DIC.. bleh | |
Hi guys, So the question is pretty straight forward. Any sites that are really cool with a HUGE variety? I'm mostly looking into downloading metal, just incase there's cool sites for that also. A little twist perhaps, is that I want to download it from work. But obviously there's a … | |
Hi there, I am getting a 'Cannot find symbol error' on an array in my "ViewContact" Class. The array has been created in the "MainScreen" class. Below I have pasted the code for both classes as to provide you with as much information as possible: The MainScreen Class: [CODE] package … | |
Hi there, This is just going to be a quick question. Also just note that I am i some "remote location" so I cant even show you my code. But what I want to know is this: Say you have a package called "myPackage" and inside that you have 2 … | |
Hi there, I'm getting an error saying: non-static variable MainList cannot be referenced from a static context. My snippet of code where the error is occuring: [CODE] //this method is in a class called ViewContact public void printInfo(){ int index = MainScreen.MainList.getSelectedIndex(); } [/CODE] Now the List "MainList" is in … | |
Hi there, In my little code snipet below I am trying to convert an arraylist to an array of type contact. Obviously it's expecting an arraylist of type contact to convert it to an array of type contact. But it's picking up the arraylist as type object for some reason. … | |
Re: Good mornin' mate, If you have internet explorer, once you viewing a webpage, simply click on 'view > Source'. That will display the HTML of the webpage. Most often you'll get code like java,javascript etc will be in seperate files used in the webpage through simple "href" links (That then … | |
Hi there, A thread was started earlier about splitting up a String using the split() method of the string class. Reading that did help me quite a lot in solving a problem of mine that is VERY similiar. Say I have this in a txt file: "Dean Grobler 0794400541 NA … | |
Re: With the number the user then adds, and after you've converted it to an int. Use a switch statement to take appopriate action depending on the user input... | |
Hello there, In one of my projects I'm working on currently. I have a 'cancel' button in my GUI window that is suppose to close the JFrame the button resides in. I have done some research on the web about this. But it seems like one has to write a … | |
Re: Oooh, I don't think that's possible man. That's obviously what they trying to avoid. depending if the game is a applet or a Servlet or something it might be more possible for the one or the other.. If you using internet explorer, click view > source. Then if you cant … | |
Re: Hey man, whatsup! Check out the little piece of code here: [CODE] int btnClicked = 0; public btnActionPerformed(actionEvent e) { if(btnClicked==10){System.out.println("You win!"); else{btnClicked++;} } [/CODE] Then with the button moving and all that, there's a layoutManager (not sure which one) that you can set the x and y coordinates of … | |
Helooo, Attached is a pic of my main screen of my program. Basicly it's a phone book app similiar to one you'd have on your phone. The thing that I can't wrap my mind around, is that you see the nice big textArea there? After you've added a contact now. … | |
Hi there, Consider the following code, this is a little 'snipet' from one of my classes: [CODE] private void jMenu1ActionPerformed(java.awt.event.ActionEvent evt) { NewContact n = new NewContact(); } [/CODE] The method is expected to open a new Frame, where the class of the new Frame is called "NewContact". I've recently … | |
Re: Hello, The name pretty much implies what it is, getter methods get variables, and setter methods set variables. Say for instance you a have a class called Contact, the "getName()" method in the Contact class would return the Name variable. Like so: [CODE] public class Contact { String firstName, public … | |
Hi there, I just wanted to find out if one can have a actionListener() in one .class file and then have the actionEvent() in another .class file? If not, how would I go about to get the same effect? Thanks! | |
Hello! Attached is a file (GUI.png), I quickly did this in excel so.. It looks pretty crappy obviously. But when you take a look at the image and the layout of the components etc. What would you say is the best LayoutManager to use with this? GUI design is fun, … | |
Hi there, In the code below my ImageIcon isn't showing when I run the program. I always struggle with adding Images in my GUIs and it's irritating. Is there some all important rule that I should know or something? [CODE] //Create window Components JLabel lblrequest = new JLabel("Enter amount of … | |
Re: Hi there, If I'm understanding you correctly. You can just use the 'getState()' method. Like so: [CODE]yourCheckbox.getState(); //This will return a boolean value, i.e true or false[/CODE] Hope this helped! | |
Re: LOL, Actually had a good laugh reading this :-) | |
Re: Heloooo... If I get what you're saying, you mean that you can still drag the window and resize it when the program running and you don't want that? Just go: [CODE] yourJFrame.setResizeable(false); [/CODE] | |
Re: Are you too lazy or too incompetent to even start thinking about how you going to design this? So you just go onto some website, thinking "Hey, why don't I try my luck". With this attitute you not going to learn anything. Go think about what classes you going to … | |
Re: What might also work then in that case, is maybe just converting the string that you're getting to an int or what ever you want? As in: [CODE] myInt = Integer.parseInt(theStringThatYoureGetting); [/CODE] | |
Hi there, I've just switched to Eclipse. I've been using TextPad so Eclipse is pretty cool.. But I've been getting weird error messages that I don't understand/not used to. Here they are: [CODE]JButton btnEnter = new JButton("Enter"); btnEnter.addActionListener(this);[/CODE] Here the Error says: Multiple markers at this line. -Syntax on token … | |
Re: Wouldn't something like this work? [CODE] sqrXY instance3 = new sqrXY(instance1.xaxis+instance2.xaxis, instance1.yaxis+instance2.yaxis); [/CODE] I'm just guessing here by the way, I'm a student myself... | |
Re: Sir, Googling "Web hosting" brings up numerous options from hundreds of companies. Should have no difficulty. Unless sir is staying in Kowloon Wallen City. Regards, | |
Re: Hmmm.. "There is a class Fruitlist which has a sub class apple" public class Fruitlist(){...} public class Apple() extends Fruitlist{....} "There is a class Fruit which has a sub class orange" public class Fruit() {...} public class Orange() extends Fruit {...} "FruitList uses Fruit" import Fruit; public class FruitlList(){...} "Apple … | |
Re: If you want to develop for the web though things like Servlets and JavaServerPages(JSPs) that are available in JEE is some pretty neato stuff... | |
Hi guys, I have this assignment to do: Synchronize access to the instance variable, accBalance. Because accBalance is a double and not an object, it cannot be used as the monitor. Use synchronized methods or synchronized blocks of code, as appropriate. Simultaniously test two threads. Because the threads can complete … | |
Re: Man you gotta be more specific than that, where is the data stored that you wana update? What data is it? | |
Hi there guys, I got this assignment where I need to set a session attribute. Although I'm having problems since I cant set attribute that is of type double? I got these hints but since I've worked with doubleValue() or downcasting, the hints didn't help me much.. Hints: -Recall that … | |
I'm struggling with a servlet that's suppose to represent an "online banking service". Once you run the servlet you'll see it's an extremely simple example... You enter an amount in the textfield provided, then click on the apropriate button depeding what action you want to perform e.g. "deposit","withdraw" and "balance". … |
The End.