2,443 Posted Topics
Re: Since you do not use setActionCommand("String"), the actionCommand will be based on the text shown on the button. Since they all have the same text (i.e. none) all of the Dialogs will be shown, since all of the ActionListeners (and you have a separate one for each button) loop through … | |
Re: Show your code (and use code tags). Also, is it a Date, DateTime, or TimeStamp field in the Database. Be aware though, that if your calling getDate on the field, that it will return only a Date, the time will be 00:00:00. | |
Re: executeUpdate not executeQuery (on non-select queries) | |
Re: Read the MySQL manual and Google for an SQL Tutorial. | |
Re: replaceAll doesn't exist in 1.2.2 You can find third party libraries for it in 1.3, and as of 1.4, it is standard, but it does not exist in 1.2 (although, if you search, you may find a third party library, but, as I said, I believe that was first available … | |
Re: Well, what does writeUTF take as a parameter? (As a hint, here are the API docs for DataOutputStream [url]http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html)[/url]. And what does getSelectedIndex return? (As a hint, here are the API docs for JComboBox [url]http://java.sun.com/javase/6/docs/api/javax/swing/JComboBox.html[/url].) Now, what do you think is wrong? Look closely at the docs for JComboBox. There … | |
Re: What is wrong with the thread at the top of this forum page? | |
Re: It might help to know [i]what[/i] your problem is. So far you've spelled out what the task is that you're doing, but not what problem you're having with it. We are not going to do it for you. | |
Re: Once again, it would help to know exactly [i]what[/i] your problem [i]is[/i]. | |
Re: Of course there are, and if your question had actually made any sense, someone would have answered it. | |
Re: [QUOTE=weasy;613508]Javascript is amazing, I didn't think you could touch mysql with it! Everyone kept telling me to use php with my js to get into sql. HAHA I feel like a million bucks![/QUOTE] Except that this [i]isn't[/i] JavaScript. | |
Re: The compiler messages [i]might[/i] help. Just maybe. (Especially since 90% of the people here are not even going to look at the code without that even. And many of the others won't look because you didn't even bother to use code tags, so that the code woud actually [i]look[/i] like … | |
Re: And your question is? No one is going to do your homework for you. Not only do we not condone cheating, but it is against the terms and conditions you agreed to when you created an account here. | |
Re: Use the variable al not the Type/Class ArrayList when you call add. | |
Re: Uhm, write some? If this is your job to write this code, then write it. We are not going to do it for you. That said, if you have some problems, then post what you already have, post any and all error/compiler messages, and a complete, but succinct, description of … | |
Re: Add an e.printStackTrace() to your catch block and post the entire error message. It's probably that you don't have the sqlserver driver jarfile on your classpath. | |
Re: [code] Calendar a = new Calendar(); a.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); Date b = Calendar.getTime(); [/code] As an example. There's a bit more to it, depending on exactly what you want to do, but that's a start (and more than a start). | |
Re: He does know the answer, but it's your job that depends on it, so you had better [i]learn[/i] how. you should have known at least something about it before you started that job. And you're begging here for finished code is completely, and utterly, rude. Use Google, there are more … | |
Re: Frame uses a BorderLayout by default. So, add one West, and one Center, or one Center and one East, or one East and one West, or change the layout to FlowLayout. | |
Re: So? What do you have? We are not going to do your homework for you. Not only do we, personally, not support cheating, but it is also against the terms and agreements you agreed to when you signed up for an account here. | |
Re: That is a legacy Driver. It is only around for backwords compatability. Use com.jdbc.mysql.Driver instead. P.S. No need to change your jarfile (depending on the version of course), just change the String in the Class.forName() or Driver.registerDriver() method call. | |
Re: Look at the following two lines [code] for (int i = 0; i<grid.length; i++){ for (int j = 0; j<grid[0].length; i++){ [/code] Which variable is being incremented at the end of the second for loop? Is that the one you wanted to increment? I don't think so. Edit: And I'm … | |
Re: So, someone did your work (or most of it) for you, but left you with a little nugget to complete yourself, and so now, you'll post here (without even removing the comments that clearly spell out that someone else did it) hoping that we do even that litlle nugget for … | |
Re: JTable? GridLayout and a bunch of JLabels/JTextFields? As above, but more complicated with GridBagLayout (or multiple nested BoxLayouts)? | |
Re: What does the API docs say about what getText() returns (and whether or not there is even a write() method in JTextArea). And how do the tutorials show about using a FileWriter? Come on man. You can at least make a [i]real[/i] attempt. You can't just make stuff up as … | |
Re: Google might help you with that (with a little initiative and correct spelling, anyway, both of which are probably more than you can handle, seemingly). | |
Re: this, which you already have, [code] f.setLocationRelativeTo(null); [/code] should already take care of that. Have you tried it? | |
Re: This is a continuation of [url]http://www.daniweb.com/forums/thread120574.html[/url] Please stick with that thread. I have asked the admins to delete the third thread you created and asked them to close this one. | |
Re: Seemingly com.sun.java.swing.plaf.metal.MetalLookAndFeel doesn't exist. | |
Re: [code] server.lookupserver.main(serv); [/code] Where is any of the above (aside from the String array serv) declared and/or defined. According to your code, server is a package, so the only way this could possibly work, is if "lookupserver" were a class within server, and main a static method in that class. | |
Re: this error message is quite self-explanatory [code] Play.java:5: Play is not abstract and does not override abstract method keyReleased(java.awt.event.KeyEvent) public class Play extends JApplet implements KeyListener, FocusListener, MouseListener { [/code] You have implements KeyListener and have not (in that class) implemented (i.e. defined) the method [code] public void keyReleased(KeyEvent e) … | |
Re: Why don't you look at the source code for nextDouble (or some other method) of the java.util.Random class? | |
Re: in pseudocode time=getCurrentTimeInMillis rs=stmt.executeQuery time=getCurrentTimeInMillis-time | |
Re: setCaretPosition Read the API docs. | |
Re: The vector contains the [i]data[/i] in the cells, not how it is to be displayed. What you need to change is the CellRenderer. See the Swing [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/table.html"]JTable Tutorial[/URL] paying special attention to the [i]Using Custom Renderers[/i] section. | |
Re: Well, do what the warning says and run javac using the "-XLint" option. That will tell you [i]what[/i] is deprecated, and you can then look at the API doc for that method and that will tell you what you [i]should[/i] be using. | |
Re: [QUOTE=MattEvans;580627]You're more likely to get help with the problem if you explain the problem briefly -- rather than just posting a block of code and expecting others to actually [i]find[/i] the problem aswel.[/QUOTE] Not only "more likely", but more like "required". I for one, and most others here, will not … | |
Re: Because accept blocks until it gets a connection attempt. You should be placing your network (and all other operational code) into a different thread from your GUI code, because when you attempt to perform an operation on the Event thread, the GUI will not respond until that operation is finished. … | |
Re: Ha! I'm sorry, but do you know what the "common" meaning of the phrase "stuck up" means? It means someone who acts and/or thinks as though they are better than everyone else, i.e. arrogant in the most irratating and annoying way. Just thought you might like to know, since you … | |
Re: Why don't you simply use String's split method and ignore the last resulting index? | |
Re: We might, if we knew what you meant by "difficulties". Is it not compiling? Are you getting Exceptions when running? Are you not getting the expected Results? We need some more (actually, alot more) detailed information. | |
Re: [code] public static double averageScores(double[] g) { double total = 0, a; for (double i = 0; i<g.length; i++); total = total + g; a = total / g.length; return a; } //end averageGrades() [/code] In the above code, the line where you are declaring total (and I assume declaring … | |
Re: [QUOTE=lazybugger;545769]Hi all, I`m doing a project on an online bulletin board. I`m not able to configure tomcat in my windows machine. And i`ve been able to compile and run servlets in command line. [/quote] Then its probably [i]not[/i] a servlet, as it is notoriously hard to get a servlet to … |
The End.