2,443 Posted Topics
Re: After calling setIcon, call validate and/or repaint on the component (or, even better, on the container that contains the component). | |
Re: Make one up and then use the ftype and assoc commands to create the associations (on windows, on Linux you probably need to use the "control panel"). Google those commands. Edit: And, if you wish to "deploy" that association, then make sure whatever "installer" maker you have can handle the … | |
Re: Well, nothing is fool proof. You need to use the no-cache and expires pragmas/headers, and use some JavaScript to wipe out the history on the browser (Google "javascript history", although this might also be deactivated). But, no matter what you do, you need to have a session check on each … | |
Re: Because Component is an awt element not a swing element. Cast to JComponent. | |
Re: First of all "run" should not be synchronized. And, if you synch on "lock", you should also "wait" on "lock", not "this". See the tutorials (and API docs). [url]http://download.oracle.com/javase/6/docs/[/url] | |
Re: What do you mean "use it [i]as[/i] an int". If you want the 0-255 individual values for the red, green, and blue, then [i]maybe[/i] you should be using the getRed(), etc methods, rather than the getRGB method. P.S. The API docs can be [i]really[/i] helpful. [i]Use[/i] them. | |
Re: Just simply do a [code]//pseudo code while(readline) switch(++count) case 2: case 3: case 4: do something and break case 10: case 11: case 12: do something break default: [/code] | |
Re: [QUOTE=lisaroy1]To learn JAVA roseindia.com is also a very good site[/QUOTE] No its not. That thing is such a collection of out of date examples and hacks and bad programming practices (it actively advocates scriptlets in JSP which has been discouraged by Sun, and all but deprecated, for 10 years or … | |
Re: BTW, objects toString method prints the [i]hashCode[/i] of the object in hex representation. That is [i]not[/i], necessarily, a memory address in the first place. So, in short, you [i]can't[/i] access the "memory location". The physical memory location has, for the Java programmer, no relevance. You do [i]not[/i] need it, and … | |
Re: Why don't you try printing out what's returned? Also, where is the catch block? You're not just ignoring exceptions, are you? | |
Re: Then it looks as though the query isn't returning anything, or, if [i]that[/i] is the [i]complete[/i] output, then the browser doesn't recognise it as a proper response. | |
| |
Re: Looks like your file associations are incorrect. jar should be associated with "java -jar <file>" | |
Re: Post the complete directory/file structure of your web-apps/<yuor-app> directory and the contents of your web.xml file. | |
Re: Also posted [url=http://www.dreamincode.net/forums/topic/210610-my-programming-skill-is-very-weak/]here[/url] with many of the same answers as here. I, for one, do not like wasting my time repeating advice thats already been given simply because the OP is not considerate enough to notify people that he has already asked this somewhere else. | |
Re: A submit button will forward to the page listed in the form tag, of course. What you need is some java script to add on a query parameter to that url and a "central" site that forwards the request to the proper page based on that parameter. ![]() | |
Re: Setting a "watch" is a function of the Debugger the IDE uses, so read the IDEs documentation. | |
Re: With an int variable and the ++ operator after every call to next()? | |
Re: Use the setCharacterStream method of PreparedStatement and feed a Reader directly to the PreparedStatement. | |
Re: FYI Also posted [url=http://www.java-forums.org/javaserver-pages-jsp-jstl/37551-values-saved-twice-mysql.html]here[/url]. @OP If you are going to cross-post, please at least have the decency to [i]say[/i] that and post the links to [i]all[/i] [b]in[/b] [i]all[/i] of the threads, as well as providing summarys of what has happened from time to time. No one likes to waste their … | |
Re: See the API docs for the String class and its split method. | |
Re: Use ";" instead of "/" as the sed separators. instead of [code]s/<UDN></UDN>/<UDN>uuid:b346ee95-93b3-4922-a132-cf72762b9318</UDN>/g[/code] use [code]s;<UDN></UDN>;<UDN>uuid:b346ee95-93b3-4922-a132-cf72762b9318</UDN>;g[/code] as that "/" in "</UDN>" is garbling your sed command. | |
Re: With what? You haven't stated what the problem is. You've stated the goal, but that is for you to implement. | |
Re: Well start out by defining a class and within that class defining the two methods described above, as a start. Then, in the main method, ask for input and convert it using those methods. | |
Re: I assume by [QUOTE=smcr01]I got this program that supposed to display a diamond[/QUOTE] you mean you copied some code out of the Internet for your assignment. Well, a homework assignment is for you to [i]do[/i], not [i]copy[/i]. How do you expect to [i]learn[/i] anything when you don't [i]do[/i] anything. If … | |
Re: [QUOTE=newbie14]Dear All, I have a java application which link to db on another computer on the local lan. The problem I have install jdk_1.6_21 without any problem. Then I have paste mysql-connector-java-5.1.14-bin.jar in /usr/java/jdk1.6.0_21/jre/lib/ext. When I compile my program has no problem when I try to run I get this … | |
Re: Don't associate an action event with the radio button, but, rather, just with the jbutton, then have the listener simply check the value of the radio button. You will probably have to build up a map with the button->radio associations (or make your own "extneds JButton" class where you can … | |
Re: So, you have a homework assignment due on Saturday, and download code out of the Internet on Thursday (that you don't understand), and expect us to finish it for you. Well, well, what will have [i]you[/i] done to earn your grade, then? | |
Re: No idea what you want. In any case, there is only [i]one[/i] int type in Java, 4 bytes signed. If you want more, use long or BigInteger, if you want less use short. | |
Re: As long as there are no "quoted" fields in the csv, then simply read it line by line (using a BufferedReader wrapped around a FileReader and BufferedReaders readLine method) and use split to split the line to a String[] and take index 3. Edit: Also, if you don't need to … | |
Re: Uhm, the one provided [i]by[/i] netbeans? Visit their website. | |
Re: Actually, that won't work, anyway. As if you replace all o with x then all x with o your string will consist of nothing but o Step 1: get string Step 2: replace x with z Step 3: replace o with x Step 4: replace z with o Why do … | |
Re: Sure, reverse engineer/decompile them, then right a "controlling" wrapper program, and recompile them into a single program. | |
| |
Re: Thanks for what? We are definately not going to do it for you, [i]especially[/i] when you can't even take the time to describe your problem. Show your code, provide a good, but short, description of the current problems with it, and provide any and all error/compiler messages and we [i]may[/i] … | |
Re: You don't want to use CLASSPATH anyway. If you [i]insist[/i], however (and they [i]always[/i] do), simply add that line directly to the .bash_profile (if that's even used otherwise .bashrc) environment file. Edit: If, however, you [i]insist[/i] (and they [i]always[/i] do) on keeping it in a separate script, then you need … | |
Re: HttpURLConnection and an HTMLParser ? | |
Re: 1. and 3. Connection Pools, see the documentation for the web container you'll be using. 2. A class that provides the user interface and an interface (java interface) and every "object" that should be searchable should implement this interface. | |
Re: By using a WindowListener, an ActionListener, and an ItemListener. | |
Re: Since you are only generating up to 10 numbers, I would create an arraylist with all the possible values then generate an index into that arraylist and retreive and remove that index, then you are [i]definately[/i] not repeating anything and you don't even [i]need[/i] to check. | |
Re: Uhm, three overloaded methods with <T extends ComputerPart>, <T extends Peripheral>, and <T extends Service>? | |
Re: Well, how are you "doing" the download? I would assume you would use a HttpURLConnection and a JFileChooser, but it seems you are using Desktop.open(), no? | |
Re: If you are the site from which something is being downloaded, you can't, that's a browser setting. Otherwise, how are you opening the "file download box of internet explorer". | |
Re: Read the user management portion of the MySQL documentation and pay close attention to the "GRANTS" portion of it. | |
Re: [QUOTE=christos312]Hello to all. I have build a Java GUI application and now i want to convert and transfer it to an applet. I assume that whatever i have in [CODE]public void main[/CODE] will now go to the init() method of the JApplet. [/quote]Not necessarily. It would probably be a good … | |
Re: It [i]souldn't[/i] have problems with it (unless, of course, you are using the "null" layout or something). | |
Re: Uhm, nextInt(), etc, do not "consume" the newline that follows it, so if you use "nextLine" after using something like nextInt() you will get whatever there was between the type retrieved and the next newline (usually nothing if all you expected was a single type on that line). So, if … |
The End.