2,443 Posted Topics

Member Avatar for K?!

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 …

Member Avatar for sciwizeh
0
2K
Member Avatar for DAKORACING
Member Avatar for k_en

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.

Member Avatar for masijade
0
170
Member Avatar for marcosjp
Member Avatar for madhavipoudala
Member Avatar for jwenting
0
72
Member Avatar for sr0867

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 …

Member Avatar for sr0867
0
114
Member Avatar for NycNessyness

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 …

Member Avatar for masijade
0
104
Member Avatar for rajdani
Member Avatar for mayur sahay

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.

Member Avatar for mayur sahay
0
78
Member Avatar for mayur sahay

Once again, it would help to know exactly [i]what[/i] your problem [i]is[/i].

Member Avatar for masijade
0
90
Member Avatar for scorpionz

Of course there are, and if your question had actually made any sense, someone would have answered it.

Member Avatar for scorpionz
0
157
Member Avatar for cacorat

[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.

Member Avatar for masijade
0
355
Member Avatar for shweta797
Member Avatar for ceyesuma
Member Avatar for kooljoycie

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 …

Member Avatar for jasimp
0
85
Member Avatar for 9107you

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.

Member Avatar for Ezzaral
0
160
Member Avatar for roadrage75
Member Avatar for EngSara

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 …

Member Avatar for masijade
0
140
Member Avatar for regent_royal
Member Avatar for alpe gulay

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.

Member Avatar for alpe gulay
0
143
Member Avatar for NAMAN JAIN
Member Avatar for degamer106

[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).

Member Avatar for masijade
0
273
Member Avatar for shytr

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 …

Member Avatar for masijade
0
118
Member Avatar for degamer106

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.

Member Avatar for masijade
0
147
Member Avatar for mmdst11

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.

Member Avatar for masijade
0
130
Member Avatar for punitdam

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.

Member Avatar for peter_budo
0
202
Member Avatar for TheWhite

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 …

Member Avatar for jasimp
0
95
Member Avatar for harlemworld12

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 …

Member Avatar for jwenting
0
91
Member Avatar for akhil_hello
Member Avatar for jk_bscomp

JTable? GridLayout and a bunch of JLabels/JTextFields? As above, but more complicated with GridBagLayout (or multiple nested BoxLayouts)?

Member Avatar for masijade
0
39
Member Avatar for hollygef

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 …

Member Avatar for masijade
0
114
Member Avatar for msnider9
Member Avatar for lrb87

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).

Member Avatar for hiem666
-1
509
Member Avatar for jimJohnson

this, which you already have, [code] f.setLocationRelativeTo(null); [/code] should already take care of that. Have you tried it?

Member Avatar for jimJohnson
0
143
Member Avatar for saintb

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.

Member Avatar for masijade
0
132
Member Avatar for Kusno
Member Avatar for Kusno
0
246
Member Avatar for abdulraqeeb33

[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.

Member Avatar for abdulraqeeb33
0
244
Member Avatar for anbuhikaru

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) …

Member Avatar for jasimp
0
160
Member Avatar for chandanapapa

Why don't you look at the source code for nextDouble (or some other method) of the java.util.Random class?

Member Avatar for jwenting
0
106
Member Avatar for krish_kooll

in pseudocode time=getCurrentTimeInMillis rs=stmt.executeQuery time=getCurrentTimeInMillis-time

Member Avatar for krish_kooll
0
84
Member Avatar for parthiban
Member Avatar for ihtraa

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.

Member Avatar for masijade
0
92
Member Avatar for fnbhns

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.

Member Avatar for fnbhns
0
80
Member Avatar for denniskhor

[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 …

Member Avatar for Ezzaral
0
189
Member Avatar for it2051229

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. …

Member Avatar for it2051229
0
191
Member Avatar for sandeep_2482

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 …

Member Avatar for panther786
0
89
Member Avatar for Samudricka

Why don't you simply use String's split method and ignore the last resulting index?

Member Avatar for Samudricka
0
93
Member Avatar for jorgeflorencio

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.

Member Avatar for jorgeflorencio
0
121
Member Avatar for jimJohnson

[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 …

Member Avatar for Ezzaral
0
540
Member Avatar for lazybugger

[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 …

Member Avatar for jwenting
0
104

The End.