2,443 Posted Topics
Re: [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, … | |
Re: You have downloaded the DB2 Driver, right? Did you actually read the documentation that came with it? | |
Re: There is no "menu" anywhere in that code. A bunch of Buttons, but [i]no[/i] menu, so what exactly is your problem? | |
Re: Use a map. | |
Re: 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 … | |
Re: "\\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). | |
Re: [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] … | |
| |
Re: 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, … | |
Re: After adding the labels, be sure to call [inlinecode]validate()[/inlinecode] on "mainPanel". | |
Re: For whatever you want. It works extremely well for things like hit counters and authentication checks, though. | |
Re: Okay. Good luck with that. P.S. We are not just simply going to do it for you, whatever "it" is. | |
Re: And there is a large list of tutorials in a thread tacked to the top of this forum. | |
Re: 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] | |
Re: 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. | |
Re: 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. ;-) | |
Re: [code] System.out.println("firstVar is 13" or greater. \n); [/code] Notice the placement of the quotes. | |
Re: 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. | |
Re: 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, … | |
Re: 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. | |
Re: 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. | |
Re: 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. | |
Re: 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. | |
Re: 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. | |
Re: 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). | |
Re: 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 … | |
Re: [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? | |
Re: 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 … | |
Re: @OP Refactoring does [i]not[/i] necessarily mean "poorly written". It simply means you want to accomplish what is being done ina different manner. | |
Re: 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. | |
Re: 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. | |
Re: And what exactly is your question? All I see is a few unrelated actions. | |
Re: [QUOTE=darkagn;561555]What is clrscr()?[/QUOTE] ClearScreen (I assume). @OP System.out.println() about 100 times, or JNI. | |
Re: 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// } | |
Re: 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). | |
Re: 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 … | |
Re: 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. | |
Re: 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] | |
Re: [code] order by fieldname sort desc [/code] This is an SQL question, not a Java question. In the future find an SQL forum. | |
Re: [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 … | |
Re: Place the values in an array, then use Arrays.sort and select the first value (the last value is the highest). | |
Re: [code] .... b1.setActionCommand("enable"); b2.setActionCommand("disable"); .... String s1=e.getActionCommand(); .... if("quit".equals(s1)) .... if("saiyan".equals(s1)) .... [/code] Enough said. | |
Re: 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 … | |
Re: You've created the variables in TestSort1 and try to use them in Sort1. Doesn't work that way. | |
Re: 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. | |
Re: So? What are they? Try to fix them as well. | |
Re: 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 … |
The End.