2,443 Posted Topics

Member Avatar for it2051229

[QUOTE=it2051229;579015]Oh come on man.. i want a FRAME.. a window.. don't limit my creativity :([/QUOTE] You do know that you can handle a Dialog (or JDialog) in exactly the same way you do a JFrame, except that you do not have, per default, the min max buttons on the frame, …

Member Avatar for Ezzaral
0
301
Member Avatar for sivaslieko++

You have downloaded the DB2 Driver, right? Did you actually read the documentation that came with it?

Member Avatar for jwenting
0
139
Member Avatar for Kusno

There is no "menu" anywhere in that code. A bunch of Buttons, but [i]no[/i] menu, so what exactly is your problem?

Member Avatar for masijade
0
132
Member Avatar for Kusno
Member Avatar for Spartan552
Member Avatar for it2051229

And your file exception is? (FileNotFound I'm betting). That simply means that your program is executing using a different "current working direcetory" than what you expect (which can always be the case whenever it is run). You should avoid using relative paths and attempt to use the complete path (or …

Member Avatar for masijade
0
106
Member Avatar for USUAggie

"\\s+" Read the API docs for Pattern and Matcher, the String functions work the same way (and, although I haven't checked that they do, they probably [i]use[/i] those behind the scenes).

Member Avatar for ~s.o.s~
0
126
Member Avatar for swdev

[QUOTE=swdev;571889]dear all, I know how to correctly execute SQL statement using con.execute() [/quote] No you don't, seemingly, since that's not right. [quote](where con is type of java.sql.Connection). But how can I execute Microsoft Access Query Object, which require one or more parameters? Do we need to use PrepareStatement ? Thanks[/QUOTE] …

Member Avatar for swdev
-1
173
Member Avatar for raajji
Member Avatar for tomok
Member Avatar for kimbokasteniv

What do think? Is it more effecient to smithy a new knife every time you need one, or to use the same one again? But pay attention to what you've already been told. The reusabilty and definately maintenance of the code should be the first priority. [i]Usually[/i], with today's processors, …

Member Avatar for kimbokasteniv
0
107
Member Avatar for clook

After adding the labels, be sure to call [inlinecode]validate()[/inlinecode] on "mainPanel".

Member Avatar for masijade
0
103
Member Avatar for vaskar

For whatever you want. It works extremely well for things like hit counters and authentication checks, though.

Member Avatar for jwenting
0
58
Member Avatar for ejasalikhan

Okay. Good luck with that. P.S. We are not just simply going to do it for you, whatever "it" is.

Member Avatar for jwenting
0
50
Member Avatar for xyntex
Re: java

And there is a large list of tutorials in a thread tacked to the top of this forum.

Member Avatar for masijade
0
69
Member Avatar for utkarsh.cse

Yeah, take a look at the classes in the security (JSSE) package [url]http://java.sun.com/javase/6/docs/api/java/security/package-summary.html[/url]

Member Avatar for masijade
0
122
Member Avatar for spywx2003

A frame will size itself according to the components contained within. Whether that answers your question about the "data" remains to be seen (since I, obviously, have no idea how your displaying that "data"). But, as a hunch, no, you do not [i]have[/i] to use setSize() on a JFrame.

Member Avatar for jwenting
0
97
Member Avatar for dilkash2007
Member Avatar for StephNicolaou

Well, equals compares the String values (the String equals method that is, of course) of the referenced Objects. The String value of the null reference is "null" not "". Keep that in mind. ;-)

Member Avatar for masijade
0
213
Member Avatar for Sugarskull

[code] System.out.println("firstVar is 13" or greater. \n); [/code] Notice the placement of the quotes.

Member Avatar for masijade
0
392
Member Avatar for Geekerz

You want to stop it from "hurt more comps" (not that I believe either wrote one, or that you want to stop it), go to the police with your virus and give them a detailed description of your first use of it.

Member Avatar for StephNicolaou
0
125
Member Avatar for abhi287

It might help if you showed your code (and hopefully the DB stuff is in a bean and is [i]not[/i] a scriptlet in your jsp), and then trying to better explain what it is you want, because I'm not [i]at all[/i] sure of what it is you're asking here. Also, …

Member Avatar for javaAddict
0
158
Member Avatar for nireekshan
Re: jsp

Do not cross-/multi-post, it is extremely rude. Stick with one thread, please. Google has all sorts of code for you, you simply need to be competent enough to modify it for your needs.

Member Avatar for ~s.o.s~
0
127
Member Avatar for nireekshan

Why are you continually creating new threads on the same topic? Why don't you simply reply to one of the threads you've already created? This is getting ridiculous.

Member Avatar for jwenting
0
87
Member Avatar for ravicsit

No idea what you're actually talking about, but yes, there are plenty of people here who can, and will help you. No one here, will do it for you though.

Member Avatar for jwenting
-2
93
Member Avatar for nireekshan

Do not cross-/multi-post, it is extremely rude. Stick with one thread, please. Google has all sorts of code for you, you simply need to be competent enough to modify it for your needs.

Member Avatar for masijade
0
110
Member Avatar for katharnakh

It's because those are octal escape codes, and there are no 8s or 9s in octal numbers. Edit: Also a char is a [i]single[/i] character. So '3' is okay, but '33' is [i]two[/i] characters, so it is not okay.

Member Avatar for katharnakh
0
118
Member Avatar for k_en

1) The same as the difference between regualr shell scripting and CGI (although much more "complicated" on both parts). 2) No. 3) In a J2EE application (saying more won't really help you anyway, until you're familiar with J2EE).

Member Avatar for masijade
0
65
Member Avatar for bobweir

I assume it's these lines that are causing the problem? [code] ... Student student1 = new Student(); ... Student student2 = new Student(); ... [/code] Well, that would be because they are attempting to use the default constructor, and your class doesn't have one. The compiler will automatically create a …

Member Avatar for masijade
0
178
Member Avatar for hazelle

[QUOTE=hazelle;562806]what kind of a programmer are you??You can even help a new programmer in a very little problem...[/QUOTE] Help? yes. Do it for you? [b][i]NO[/i][/b]! What do you have so far?

Member Avatar for stultuske
0
107
Member Avatar for a_iyer20

What is wrong with using the String.format() method or PrintWriter.printf() method? Edit: Nevermind. It's suppossed to have [code]   [/code] in it's body. What are you viewing the output with, however. You show what you are doing, but what is this a part of? A servlet, A JSP, a standalone …

Member Avatar for masijade
0
2K
Member Avatar for algo_man

@OP Refactoring does [i]not[/i] necessarily mean "poorly written". It simply means you want to accomplish what is being done ina different manner.

Member Avatar for Ezzaral
0
80
Member Avatar for fnbhns

Yeah, show us what you have and we might help you correct/finish it, but [b][i]we are not going to do your (home)work for you[/i][/b]! If that is what you are expecting, then you deserve to die the death of 1000 tortures.

Member Avatar for majestic0110
0
59
Member Avatar for Syntax Error

Read the file and write a new file leaving out the pieces that should be "deleted". Then delete the original file and rename the newfile to the the name the oldfile had.

Member Avatar for masijade
0
133
Member Avatar for hazelle
Member Avatar for jwenting
0
93
Member Avatar for sannidhikumar99

[QUOTE=darkagn;561555]What is clrscr()?[/QUOTE] ClearScreen (I assume). @OP System.out.println() about 100 times, or JNI.

Member Avatar for masijade
0
92
Member Avatar for tomok

I haven't tried it very often, but look up the sed command "N". It is meant to append an additional line into the pattern space. Try something like /"[^"]*$/{ N s/\n// }

Member Avatar for eggi
0
121
Member Avatar for a_iyer20

Well, don't just use spaces on your own. Try [i]formatting[/i] as he suggested. Take a look at String.format() to format the String before output or PrintStream.printf() to format the String during output (System.out [i]is[/i] a PrintStream if it is System.out that you are using).

Member Avatar for masijade
0
11K
Member Avatar for Shveetis

Well, you are neither adding the JLabel to anything, nor "refreshing" whatever you might have wanted to add it to. Edit: And, if you want to change a Lable that already exists somewhere in the GUI, then don't use new JLabel() in the try/catch block. If you do, you have …

Member Avatar for Shveetis
0
116
Member Avatar for madhusamala

please do your own work. And, even if people are willing to do your (home)work for you (and not despise you for so shamelessly asking it), you would find them at an SQL forum (which is what this question is about) and not a Java forum.

Member Avatar for javaAddict
0
110
Member Avatar for pradeep.singh28

You can have multiple statements on one connection (though only one resultset per connection, normally), but seemingly, your connection can only have one statement [i]active[/i] at the same time. Are you, per chancce, using the JDBC-ODBC Bridge, if so take a look at this: [url]http://java.sun.com/products/jdbc/faq.html#15[/url]

Member Avatar for masijade
0
132
Member Avatar for abhi287

[code] order by fieldname sort desc [/code] This is an SQL question, not a Java question. In the future find an SQL forum.

Member Avatar for masijade
0
86
Member Avatar for amitahlawat20

[QUOTE=amitahlawat20;559014]// [B]runtime error encountered , cannot resolve symbol i[/B][/QUOTE] And, besides, that's a compile time error, not a runtime error. It doesn't occur in either case, so this can't be your actual code, or you are actually attempting to compile something else and only [i]think[/i] you are attempting to compile …

Member Avatar for masijade
0
105
Member Avatar for codered152

Place the values in an array, then use Arrays.sort and select the first value (the last value is the highest).

Member Avatar for masijade
0
79
Member Avatar for devilgod

[code] .... b1.setActionCommand("enable"); b2.setActionCommand("disable"); .... String s1=e.getActionCommand(); .... if("quit".equals(s1)) .... if("saiyan".equals(s1)) .... [/code] Enough said.

Member Avatar for new_2_java
0
153
Member Avatar for pavya133

What are you talking about? Send a parameter dynamically? No idea what you mean there. However, why don't you just make the defintion as follows: [code] public whatever whateverMethod(Object... arguments) { // whatever } [/code] Now you can pass it as much of anything as you like. The necessity for …

Member Avatar for masijade
0
158
Member Avatar for the juice

You've created the variables in TestSort1 and try to use them in Sort1. Doesn't work that way.

Member Avatar for the juice
0
2K
Member Avatar for virubudy4u

And you don't need to. An array is a special type of Object, and length is a field of that object. But the "objectness" (yes, I can make up words) of an array is not something you need to worry about.

Member Avatar for bugmenot
0
100
Member Avatar for Noliving
Member Avatar for nikk

To have it expired automatically, you need to configure the Application Server/Web Container properly. Reading the session properly, and redirecting to a login page, is something you will have to do though. The above command is the one the server will use, you can use it yourself, as well, but …

Member Avatar for nikk
0
236

The End.