3,927 Posted Topics
Re: The changes will not be automatically saved into the file that you parsed the document from. You have to write that in-memory DOM back out to the file yourself. See the following tutorial section on how to do that: [url]http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPXSLT4.html#wp64603[/url] | |
Re: [QUOTE=hbk619;495302]I told my friend I love him and he said "that's nice but I'm not interested". Yay for me *shifty*[/QUOTE] Hehehe, try it on the mail carrier next :) Perhaps the grocer after that. Guaranteed to illicit all kinds of fun reactions. | |
Re: If you just want to return an element if a certain value matches either of two fields, all you really need to do is this[code=java]public KasseInterface søgVare(String value) { for( KasseInterface elem : varer ) { if (elem.getVarenummer().equals(value) || elem.getVarenavn().equals(value)) { return elem; } } System.out.println("fandt ikke nogen vare!!!"); return … | |
Re: I don't think you will be able to run an Access database within a jar. You will need to unpack it to a local directory. | |
Re: I do not think you want to use fingerprint scanning for attendance. Not only is print recognition a complex process, but many people will not be happy being forced to present fingerprints for attendance. I would recommend a barcode-based card approach instead. Barcode software and readers are widely available and … | |
Re: Just put a loop on the first dimension of the array around the code that reads the input line. Also, main() should not throw Exceptions. Learn to use try-catch blocks. And read this as well: [url]http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html[/url] | |
Re: As you've probably noticed, JSpinner does it's own thing with the mousePressed and mouseReleased events internally, so your added MouseListener doesn't respond to these. This leaves you with working through the ChangeListener alone. Adding a timer to poll for changes and checking for a minimum time between changes, you can … | |
Re: You didn't show the method signature of your discard() method, but is sounds like you coded it discard(card[]) instead of discard(int). If you can post the code for the discard() method, it would be helpful. | |
Re: Have you run it? Did it work correctly? It seems like you could tell on your own if it's working or not. If it's not, then post specific questions about what is not working correctly. | |
Re: Please refer to the announcements at the top of the forum. Homework help is only given to those who show effort. Come back with some code indicating effort and specific questions regarding what you are having trouble with and perhaps someone can help you. | |
Re: javaAddict is correct. You have not initialized the component variables. The stack trace indicates this is occurring on line 14 in your constructor, so that is where you would want to look first to debug the error. Learning to read the stack traces will save you a lot of time … | |
Re: If you take a look in your JDK installation folder under "demo\jfc\TableExample", there are several table example programs, including a TableSorter. I've also attached a zip file containing a JSortTable implementation from Java Pro magazine. I was going to link to it in the archives, but it seems Java Pro … | |
Re: > public void pain(Graphics g) I think you meant to type "paint" here instead of pain. :) | |
Re: Well, you might get something to work using [url=http://java.sun.com/javase/6/docs/api/java/awt/Robot.html]Robot[/url], otherwise you would need to use JNI to access the win32 API. | |
![]() | Re: [QUOTE=uniquestar;491090]do you think he actually knows the offensive meaning?[/QUOTE] He seems to like to just bang on the keys without a coherent thought in his skull. |
Re: If you were asked that in an interview and do not have the answer and cannot figure out how to find that answer, you really should not have the job. A working programmer should know how to find answers to such things on their own through the documentation or other … | |
Re: You may want to look at this bug report: [url]http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4765247[/url] Depending upon which look and feel you are using, the behavior of the background color for JTabbedPane may vary. I ran across several threads regarding this behavior. If you only want the content area of the tabbed pane to be … | |
Re: Make the method static. | |
Re: [QUOTE=curt22;491885]Hello everyone, I was wondering what a good book to start learning Java would be. I know a little about programming like variables, function, etc. , but not object-oriented stuff. I was thinking of buying Learning Java, 3rd Edition, but I'm not sure. What do you think is the best … | |
Re: [QUOTE=RoOose;492247]Thank u for helping me. I knew this is sorting , but I didn't know how we wrote it . Can u explain for me that, please? Thank u.[/QUOTE] You have the code right in front of you, just read it. Trace the loops if necessary to see how the … | |
Re: These tutorials from Sun cover Reflection, which is what you will be using: [url]http://java.sun.com/docs/books/tutorial/reflect/index.html[/url] [url]http://java.sun.com/docs/books/tutorial/reflect/member/ctorInstance.html[/url] Another tutorial article: [url]http://www.javaworld.com/javaworld/jw-09-1997/jw-09-indepth.html[/url] and [url]http://www.onjava.com/pub/a/onjava/2007/03/15/reflections-on-java-reflection.html?page=2[/url] | |
Re: I use Netbeans. Eclipse is just fine as well, but I never really took to the Perspectives thing. Also, ctrl-k for word completion is very addictive for a lazy typist like me :) | |
Re: Well, the slash is pretty unclear as it stands, but yes, J2EE specifically refers to a separate platform of server-side service-oriented components: [url]http://java.sun.com/javaee/[/url] You would need to inquire about their specific expectations for the job to be more precise. Knowing standard Java does not bring with it any experience at … | |
Re: I initially learned a lot from Core Java2 v1 and v2 also. I haven't read Head First Java, but I've heard good things about it. I have read Head First Design patterns and thought they did a great job on that one. | |
Re: [QUOTE=mickinator;480944]Stick it under an extremely wobbly table to add stability.[/QUOTE] Excellent! | |
Re: You seem to have misunderstood my suggestion to incorporate the Saucer game class into the SaucerMenu. I was implying that you really only need a single frame for the menu and game. Just moving the Saucer class definition to be an inner class of SaucerMenu doesn't really help you much … | |
Re: [QUOTE=harpreet1582;490880]W A P to find prime number in c language[/QUOTE] PEBKAC | |
Re: Forcing people to vote when they are completely uneducated on the issue does not help a thing. If, by law, they had to go in and make a choice then it would just add random noise to the data or, even worse, ruin some elections that truly should go one … | |
Re: Why on earth would you have two separate classes for that? Why does the first class not submit to the database? Post the code that you have written also. You do have some, yes? | |
Re: [QUOTE=savinashr;489711]i'm quite new to forums so need help ... is there nothing like online chat ... so i cud chat directly wid some1 online ... how do i view replys posted to my threads .. easily .... plz do reply to my mail account [email]email removed[/email] ...[/QUOTE] Some "1s" may … | |
Re: This is your final project to get a degree. It is expected to demonstrate that you have learned enough to warrant that degree. Asking how to do that project calls into question whether you actually have acquired sufficient knowledge and the ability to research and work through the tasks you … | |
Re: [QUOTE=popey118;489646]all talk abotu runescape and get your rep up! :)[/QUOTE] I think that may be working against you instead. | |
Re: Ok, here are some basic changes to get you started in the right direction. Saucer now takes a reference to its SaucerMenu from the constructor, so it can interact with the menu. I've put a returnToMenu() function in that is called when the Saucer frame closes and from showScore(). showScore() … | |
Re: Read the API for [url=http://java.sun.com/javase/6/docs/api/java/util/Scanner.html]Scanner[/url] . It shows basic usage right there in the javadocs. Try it out and repost your code if you are still having difficulties getting it to work. | |
Re: Just a couple of minor changes and you're good to go. First off, int division got you on the [icode]1/count[/icode] part. This stays zero unless you cast "count" to float. I moved the calc to a variable called "offset". Also, since it was changing by a percentage of diameter, you … | |
Re: Looks good. One additional change I would suggest though: put the code that updates the ball postions and creates a new one when needed over into a separate method like "updateBalls()" and call that before repaint in your animation loop. Repaint should generally make as few calculations as possible, since … | |
Re: [QUOTE=prettyNpearls;467569] Anyway, initially we were speaking about chlorine and its harmful affects. Did you know that if you weigh yourself, and then you shower, and then weigh yourself again you will have gained app. 2 lbs. Crazy huh? check it out. Supposedly it is because of the chlorine in the … | |
Re: Also, read through the info that is in the FAQ stickied at the top of the forum. There is more than enough to get you started. | |
Re: Perhaps some of the info in this post might help: [url]http://forum.java.sun.com/thread.jspa?threadID=5137992&messageID=9506454[/url] | |
Re: Your handler just needs to create an instance of the game class if you don't already have one and call whatever method starts the game[code]Game game = new Game(); game.start();[/code] | |
Re: Yes, that would be just fine I would imagine. You don't show the rest of the try block, but be sure to close the statement and connection in a finally{} clause so you don't chew up your database resources. | |
Re: So, to reiterate what everyone else has already told you, the answer is essentially [B][I][U]NO[/U][/I][/B]. If you need an installer that will install java for a user if they don't already have it, take a look at [url]http://izpack.org/[/url]. | |
Re: [QUOTE=jwenting;487374]read a basic tutorial. And don't use Vector.[/QUOTE] Yes, use ArrayList instead: [url]http://www.beginner-java-tutorial.com/java-arraylist.html[/url] | |
Re: JFrame is a top-level component and as such can stand on it's own as a window. JPanel is a lightweight container in which other components can be placed. JPanel cannot be displayed by itself as a top-level window. If you have a window with a single main area, using JFrame … | |
Re: Loop the outer dimension of your array and use System.arraycopy() ([url]http://java.sun.com/javase/6/docs/api/java/lang/System.html#arraycopy(java.lang.Object,%20int,%20java.lang.Object,%20int,%20int)[/url] ) to copy each inner array. | |
Re: You can use JOptionPane.showMessageDialog() with a message type of WARNING_MESSAGE: [url]http://java.sun.com/javase/6/docs/api/javax/swing/JOptionPane.html#showMessageDialog(java.awt.Component,%20java.lang.Object,%20java.lang.String,%20int)[/url] | |
Re: You cannot really reverse a mod operation, as only the remainder of the division operation is retained. | |
Re: [QUOTE=sneekula;484896]Pot was declared illegal in the US in the 1930's, as a way to deport massive amounts of Mexican workers during a period of high unemployment.[/QUOTE] Addressed here: [url]http://www.daniweb.com/forums/post461975-116.html[/url] | |
Re: Some background reading available at Ars Technica, see Climate: [url]http://episteme.arstechnica.com/eve/forums/a/tpc/f/770002407831/m/841006407831[/url] Additional answers to questions can be found here: [url]http://gristmill.grist.org/skeptics[/url] | |
Re: Sure, the first thing that would help is filling in those methods a bit more. Did you have any other specific questions? |
The End.