2,443 Posted Topics
Re: Uhm, read each cell in the column and total them? | |
Re: extend JComponent and do you're actual drawing by overriding paintComponent | |
Re: Don't do it through MS Access. If you a need a "simple" db that you can use "anywhere" (which you can't with MS Access, BTW) use JavaDB/Derby and distribute the derby.jar with your app. | |
Re: Here [code]for(int h=0; h<numMatrices; h++) { int numRows = 13-h, numColumns = 12-h; matrix[h] = new Matrix(numRows, numColumns); [/code] you are varying the "sizes" of the matrices using the index into the Matrix array. Here [code]int nRows = A[0].numRows, nColumns = A[0].numColumns; for (int i = 0; i < A.length; … | |
Re: Yes it is. Instead of simply pushing on the blue (right pointing) triangle, click next to it to get the pull down, and select something like "configuration" and play around in there a while. You would be better off, however, since you are learning, programming with a simple, highlight capable, … | |
Re: AJAX / JavaScript to send a post request to another page. | |
Re: Because the compiler you used is setup to search the source directory, as well as the classpath, and compile those items from the src dir if they are newer than the current class versions. | |
Re: Read [url=http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html]this[/url] completely, thoroughly, and carefully and implement [i]all[/i] of it's suggestions. | |
Re: See the API docs for and Google RandomAccessFile. | |
Re: The default layout option for JPanels (which you use in your class) is FlowLayout with a default flow of left to right, so, as Ezzaral says, use a different layout. | |
Re: Check out multicast if you [i]really[/i] feel the need to advertise. Note that this will probably only be a "local network" feature as most gateways will probably not propagate the signal. Better, however, would be to simply have a range of, say 5 or so, ports and simply have the … | |
Re: listFiles() and use the length of the returned array? See the API docs for File. | |
Re: [QUOTE=Vinnijin;1326624]How Ajax will be used in java ?[/QUOTE] Since I'm not sure if this question is a question or just a spam intro I'll leave the question and just remove the spam link. | |
Re: "key" is an integer, not a String. | |
Re: Because you won't get "null" until the server closes its end of the connection. Which you don't want, I would assume. I would assume you want to continue using the same connection, right? So the server is going to have to send some extra String, or something, to signify that … | |
| |
Re: You can implement multiple interafaces but you can extend only one class. So be careful with abstract classes in the first place and the [i]only[/i] reason to use an abstract class in the case listed above is when there is some common, non-trivial, [i]implementation[/i] to be considered as well. | |
Re: I'm sorry but what part of [quote]Only level 0 dumps are allowed on a subdirectory[/quote] do you not understand? I can only assume "$now" references a directory, of course. | |
Re: [code] public static Integer one = new Integer(1); [/code] one is a static member that is an instance of the Integer type. Same same. | |
Re: Try [url=http://download.oracle.com/javase/6/docs/api/java/nio/channels/FileLock.html]FileLock[/url], but no guarantees, of course. | |
Re: Uhm, what do you mean "extract the part". To concatenate Strings you use "+" of course. I.E. [code]string1 + string2[/code] | |
Re: Add derby.jar to your project's library list. And that is as much as I will say about it as classpath discussions always become ugly on a forum. Find a tutor and/or read the IDE documentation thoroughly and read everything you can find about classpath. | |
Re: Because in the second case the compiler knows that b will [i]always[/i] have a value, but it does [i]not[/i] know that in the first version (the compiler does [i]not[/i] compute expression values). | |
Re: > DEAR FRIENDS, I M NEW TO JAVA, > > PLEASE ANSWER MY QUESTIONS: > 1. I am trying to use float and double in java? can u tell me how to use it? > By using the types float and double? > > 2. I am trying to calculate … | |
Re: That is a pure personal choice design question. If it is going to be local intranet anyway, you could do simple multicast and let each "client" receive and broadcast the messages themselves, without any kind of a server. | |
Re: By modifying your classpath. See the documentation for the IDE you are using and these documents for command line and jarfile use: [url]http://download.oracle.com/javase/6/docs/technotes/tools/solaris/java.html[/url] [url]http://download.oracle.com/javase/tutorial/essential/environment/paths.html[/url] [url]http://download.oracle.com/javase/tutorial/deployment/jar/downman.html[/url] Edit: And that's as much as I am going to say about it. If you can't figure it out from these items than get a … | |
Re: If you need to ask this, then you definately do [i]not[/i] need a new networking protocol, but simply want a new protocol [i]on top of[/i] either TCP or UDP (like HTTP, SSH, most DB protocols, etc, etc, etc). | |
Re: FYI, related to [url=http://www.daniweb.com/forums/thread307927.html]this[/url]. | |
Re: See SwingWorker. Your problem is that you are performing your "action" on the Event Thread, rendering it incapable of responding to "user events". | |
Re: I'm sorry, but if you "know the concept of abstract class", then you know how it "is different from the normal class". Maybe we should begin with you stating what you believe to be "the concept of abstract class", and what you believe to be "the normal class". Then we … | |
Re: Do not cobble together statements like this unless you [i]want[/i] to allow SQL injection attacks to succeed or [i]want[/i] seemingly "random" SQL syntax errors due to invalid characters. See PreparedStatement. | |
Re: Well, what do you have so far and what, exactly, are you having problems with. | |
Re: What do you have against "parsing librarires"? Especially since there is both a DOM and SAX parser included in the JDK and JRE. In any case it's called [url=http://www.regular-expressions.info/tutorial.html]regex[/url]. or use toCharArray() and [i]really[/i] do it yourself. | |
Re: What do you think the "toCharArray" method of String is for? See the API docs for String. | |
Re: Aside from your [url=http://www.java-forums.org/new-java/31680-how-delete-txt-file-if-contents-empty.html]croos-post[/url] see the API docs for the File class and see if you can combine the length and delete methods. | |
Re: Because su opens an interactive shell you might try placing everything below the su command into a seperate script (lets imagine we call it newScript.ksh), then change this script to the following: [code] #!/bin/sh su - postgres -c "/path/to/newScript.ksh" [/code] | |
Re: Unless you [i]need[/i] to use regular expressions, then use "replace" rather than "replaceAll". | |
Re: @OP what was wrong with this thread [url]http://www.daniweb.com/forums/thread114556.html[/url] Oh, wait, don't tell me. You were upset that I didn't simply [i]give[/i] you the answer, but rather tried to make you [i]think[/i]. That must have hurt, man. I can't imagine the pain. Ungrateful kids these days. | |
Re: [url]http://download.oracle.com/javase/tutorial/extra/generics/index.html[/url] | |
Re: It's [i]like[/i] overriding, it is [i]not[/i] "the same as" overriding. Overriding makes it impossible to use the overridden method without instantiating anew instance of the class containing it (not a class that extends that class). Static methods can [i]always[/i] be used. [i]Which[/i] one you use depends on which Class reference … | |
Re: Because the first line of [i]every[/i] constructor, is a call to a super constructor. If you do not add it yourself (i.e. call a specific super constructor) the compiler automatically adds a call to the default constructor of the super class. And, yes, obviously, this call will finish before the … | |
Re: PHP is very good for small projects. It is not all that scalable, however, and is not suited to large projects. JSP/Servlets are, generally, also faster (when written with comparable quality, whatever that may be). | |
Re: P.S. unless the spot where you're using a StringBuffer is "thread" sensitive, use a StringBuilder rather than a StringBuffer. A StringBuffer is "synchronized" whereas a StringBuilder is not, making a StringBuilder more performant when synchronization is not an issue. |
The End.