2,443 Posted Topics
Re: In what way? You do know, it is always helpful if you post [i]exactly[/i] what it is that is not happening as expected (along with all compiler/error messages). | |
Re: just change this [code] latestLine = read.readLine(); System.out.println(latestLine); while(latestLine != null) { latestLine = read.readLine(); [/code] to [code] read = new BufferedReader(new FileReader(file)); latestLine = null; System.out.println(latestLine); while((latestLine = read.readLine()) != null) { [/code] It's because you are using the results of readline without first checking what it returned, and … | |
Re: The problem is that the panel will only cover as much area as it needs. Anything beyond this area is "ignored" during a validate on the panel (since that area no longer "belongs" to the Panel. 2 "quick" possibilites (I would try the second first). Have you tried [code] Dimension … | |
Re: A DB. JavaDB if you don't want to have to use a server. Edit: Although this still looks like a "do my homework for me question", I will give you the benefit of a doubt, at the moment. | |
Re: You still need to create the [inlinecode]public Color newColor(Pixel pixel)[/inlinecode] method that you are attempting to use. | |
Re: MySQL is a server/client db. There must be some sort of server. If you are looking for a DB that doesn't need a server try SQLLite, JavaDB, HSQL, or Apache Derby (or even Access, but I, personally, would not even consider that one). | |
Re: Any layout you want. There are lots of them, see the API and read every class that ends with "Layout". Now, if you can tell us how it should look, and/or exactly what you mean by "reposition my buttons", we might be able to better help you. Generally though, you … | |
Re: Simple FileInputStream and FileOutputStream. If you want to read in "binary" then there is no need to wrap those streams in anything else. | |
Re: [QUOTE=IMtheBESTatJAVA;732549]This class is moving too fast and I only know simple Java programming so far, but we're getting into multiple classes for this savings account program. If anyone can do this I will spam +rep on your for the remainder of your DaniWeb life.[/QUOTE] Well, I [i]can[/i] do it, so … | |
Re: [QUOTE=dickersonka;733785]friend lol, we do seem a bit hostile i can bet this is the sharekahn app i have saw tons of problems about just because i am nice, check out this link, the bottom post [url]http://forums.sun.com/thread.jspa?threadID=776507[/url][/QUOTE] If you made that "last post", and you're truely talking about a "Microsoft VM", … | |
Re: Yes you are, and that "doing something wrong" is using scriptlets, period. Move all of that scriptlet stuff out into a bean or two and use the "useBean" tag. | |
Re: Just simply remove those symbols? Really, those tags are only compiler "hints". They are there only for your convenience, as it is an indicator to the compiler that the following method is suppossed to override a method of an inheritied class. So, the compiler will check that it actually does … | |
Re: Uhm, Peter, what's this [code] authorsLastName = GetAuthorLastName(); [/code] ;-) However, with the way it's written (if it compiles at all) authorsLastName is an instance variable anyway (as it is not declared in the method simply defined), and that is probably not a good idea. Otherwise, knowing exactly [i]what[/i] SQLException … | |
Re: Add the java bin directory to your system path (not classpath) environment variable, or use the full path to java when executing it. | |
Re: [url]http://java.sun.com/javase/6/docs/api/java/lang/Math.html[/url] | |
Re: Depends on the DB and Driver being used, which will also determine whether it can be done at all. | |
Re: [QUOTE=adetya;727697]cant u read?ACCOUNTING MAJOR...[/quote] And? You took the course so pass or fail, but on [i]your[/i] effort. If you are not willing to put forth any effort, why should anyone else? [quote]i dont have any background in this.this is the first and definatly the last cis course ill be taking … | |
Re: JavaScript runs on the client. The perl would run on the server. Tomcat has nothing to do with either of them. | |
Re: This is an SQL question, but what the heck [code] SELECT Description, SUM(Quantity) FROM ((Select Description, Quantity, PluCode FROM Sale_Mast_Data) Union (Select Description, Quantity, PluCode FROM Sale_Mast_Data_H)) Group By PluCode [/code] Union usually "ignores" duplicate rows. So, if a row in "_H" is an exact duplicate of a row in … | |
Re: [QUOTE=chengineer;726003]can anyone find my mistake in TrainingZone.java[/QUOTE] Yes. | |
Re: [QUOTE=~s.o.s~;723784]> can somebody give me some good example of how to iterate over list, ... Using a simple looping construct for a [ICODE]LinkedList [/ICODE]has serious performance implications ...[/QUOTE] Except for the "new" for loop [code] for (<Type> var : listVar) [/code] which implements an Iterator on it's own. ;) | |
Re: Define "didn't work". Judging from the rest of your post though, I think I can safely assume that you didn't add it to your classpath properly. And, AFAIK, jpcap is the only library for this sort of thing (as Java is not really meant for this time of low-level system … | |
Re: So loop through the list and perform a file.canRead() on it before displaying it. | |
Re: Uhm, try maybe Desktop.open()? And the code always immediately reaches p.watFor(). It's just that it will stay there until the process is ended. | |
Re: before setAutoCommit(true) you need to do a commit(), but your problem comes before this. And you're real problem, at least IMHO, is using the JDBC-ODBC in Tomcat. The bridge is not threaded and Servlets/JSPs are. They do not work well together. So, that is quite possibly also your real problem … | |
Re: They compare the file objects and not the actual files that these file objects refer to. You need to actually read the files and compare then byte for byte until a difference is found (although, I would say to check the sizes first, as that is fast and if they … | |
Re: Try printing out investments.size() before the for loop. I have the feeling that it's returning 0 (i.e. it's empty). | |
Re: If they are writing everything (or even alot) in main, then they are not using Java properly. They are attempting to perform procedural programming using an Object-Oriented language. Ignore them. | |
Re: The SAX or DOM XML Parser, that comes with the JDK, and a Canvas. Good Luck, because until you actually [i]do[/i] something yourself, that's all you're getting. | |
Re: He is, seemingly, attempting to convert a C program code to Java (and not doing a very good job of it since he is simply attempting to translate line for line). | |
Re: Read that tutorial that was linked to in jasimp's post and [i]stop whining[/i]. No one here is going to do it for you. After you try it, and it still doesn't work (which it won't) then post your code, all compiler/error messages and description of what is happening and how … | |
Re: It's because of the open brace '{' you have right before it. | |
Re: This is not a Java probelm. This is a problem with the binary representation of certain numbers (such as 1/3) It can't be done. Read this entire site [url]http://en.wikipedia.org/wiki/Floating_point[/url] specifically the section on Accuracy Problems. Edit: IOW use BigDecimal if you must 1000% percent accurate (and yes, 1000 was intentional). | |
Re: Sure we can, as soon as we see what you have, you tell us what compiler/error messages it is giving you, and what it is actually producing and how that differs from what it should produce. | |
Re: Well, what do you have and what errors are you getting? | |
Re: [url]http://java.sun.com/j2se/1.5.0/docs/guide/language/foreach.html[/url] | |
Re: SimpleDateFormats will only format Date objects (or classes that extend Date). They won't work on your date class. | |
Re: [url]http://www.daniweb.com/forums/thread99132.html[/url] | |
Re: Yes it will work. The following also works (and should actually be done this way, now): [code] Vector<File> vector = new Vector<File>(); // populate vector String path = vector.elementAt(i).getAbsolutePath() [/code] | |
Re: Why should we do your (home)work for you? Google for chat/networking examples/tutorials, there are plenty of them out there. The simplest type of chat is contained as a tutorial as part of the Sun tutorials networking trail. | |
Re: You would have to keep your own count with a separate int variable. Otherwise, you have to loop through the array and count the number of items that are not null. | |
Re: What do you mean "cannot get it to work"? What exactly is, or is not, happening? Are you getting compiler or error messages? If so, post them, completely. | |
Re: Not that I think it the right way to do it (and also not that I think it will work since you will probably be expecting to be able use document objects which are not going to be there) but [url]http://java.sun.com/javase/6/docs/technotes/guides/scripting/index.html[/url] | |
Re: Google for "Andy Khan JExcel" | |
Re: You don't mask your homework attempts very well, and you don't search very well. [url]http://java.sun.com/products/jdbc/driverdesc.html[/url] |
The End.