3,927 Posted Topics
Re: So ask a question then. Posting your homework won't cut it. | |
Re: Take a look at the [URL="http://java.sun.com/javase/6/docs/api/java/awt/GraphicsEnvironment.html"]GraphicsEnvironment[/URL] API. You can get the available screen devices with the following[code]GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice[] screens = ge.getScreenDevices();[/code]The [URL="http://java.sun.com/javase/6/docs/api/java/awt/GraphicsDevice.html"]GraphicsDevice[/URL] class has a multi-screen example in the class documentation. | |
Re: So enter the product key. If you don't have one then you have an illegal copy of Vista and you're SOL here. | |
Re: Stating what you need help with on those methods would be useful as well. | |
Re: Try [iCODE]System.getProperty("user.dir");[/iCODE] | |
Re: You can't. Tomcat is a servlet engine - it has nothing to do with PHP. You'll need Apache with PHP installed. Edit: Scratch that. I spoke too soon. I guess there are ways to hook them up: [url]http://wiki.apache.org/tomcat/UsingPhp[/url] | |
Re: Have verified your query is returning results? Have you set the list model on the JList? | |
Re: Well, you can't quite work with a custom input dialog like that. There is a way to do it with an Object array for responses, but if you want radio buttons you need to create your own custom dialog. Just for the heck of it, I wrote up one way … | |
Re: You are probably creating multiple ArrayLists but without seeing the code no one could really say. | |
Re: I'm guessing your connection "con" is null. It probably failed to get the connection and you would never know it because you've discarded the exception information[code]catch(ClassNotFoundException e){} catch(SQLException e){}[/code]That's why empty catch blocks are a bad idea. | |
Re: You can start here: [url]http://java.sun.com/docs/books/tutorial/essential/io/index.html[/url] | |
Re: Your "Step 6" will do a little more than what you noted. See if you can spot it. | |
Re: Not really sure why you are getting that behavior. Your writeToLog() code wrote a StringBuffer with newline characters in it to multiple lines just fine here in a tiny test program. Are you viewing the file with an editor that's okay with just linefeeds or does it expect carriage return … | |
Re: I'd recommend starting with [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html"]How To Use Menus[/URL] in the Swing tutorial. | |
Re: You need to alter the Entity class to change how it renders. The ShipEntity is passing the path of the image file along to a parent constructor and I don't see any painting code in ShipEntity. | |
Re: You didn't post the AddressComboBoxItem class, so no one can see what that does. I can tell you that the combo box is going to display whatever your item's toString() method returns, unless you have created a custom renderer for it. | |
Re: Yeah, college can get stressful like that. If you don't keep up, you'll fail. Good luck with your program. If you have some specific questions or errors in your code, post them and perhaps someone can help. No one is going to write the program for you though. | |
Re: Doing your own homework would benefit you more. Give it a try. | |
Re: [QUOTE=Rahulkumarr;1128035]i m doing project in controlling pc via mobile .so pls tell some ideas & give documents to my id ImSoLazy @ gmail.com pls..........[/QUOTE] Why? It's your project. You're supposed to be learning something and showing some initiative with it - not hijacking someone else's thread to ask others to … | |
Re: The code above will still not print the actual original list if it contains 10s because you are never adding the 10s to the array at all. You need to add every number to the array. Then loop and print it. Then count your 10s and print the count. Then … | |
Re: There isn't a mechanism to do that easily, but you really shouldn't have any need to. Just set a "name" property on the Player object. A [URL="http://java.sun.com/javase/6/docs/api/java/util/HashMap.html"]HashMap[/URL] can provide easy indexing of them if you need it for look up purposes. | |
Re: Keep a reference to the original PrintStream before you reassign it. Then you can just swap it back[code]PrintStream defaultOutstream = System.out; System.setOut(myPrintStream); System.out.println("hello world"); // doesn't print to screen cuz it's sent to printstream System.setOut(defaultOutstream); [/code] | |
Re: This is a design discussion forum - not Code On Request. Perhaps you can search Google for some software you can buy for your needs. | |
Re: You need to keep the reference 'g' at class level or pass it to methods that need to act on it. | |
Re: Well, your second JFrame probably has a call to [iCODE]setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE)[/iCODE] somewhere in its setup code. You need to change that to use [iCODE]DISPOSE_ON_CLOSE[/iCODE] or something else. Those are not commands. They are constants you use to specify the parameter value. | |
Re: I'm sure the stack trace says more than "something about an unknown source". It contains the exact error, the method that generated it, and the line number. It would help if you posted that here as well - at least the first couple of lines. | |
Re: Just trace through and figure out how str.substring(index2,index2+length2) would end up with a position beyond the length of 'str'. | |
Re: What issues did you encounter? Yes, they are just ints and you should be able to pass them just like you have in the method signature you posted. | |
Re: I think the user name should be "baloney", which is exactly what the claim that he's tried this is. | |
Re: File > Project Properties > Libraries Add the folder/jar/etc in the Compile tab. | |
Re: Check all of your braces. You are missing one (or more). edit: hehe, cross-post. What he said ^^ | |
Re: And some additional reading: [url]http://www.daniweb.com/forums/faq.php?faq=daniweb_policies#faq_keep_it_clean[/url] | |
Re: Why do you need to write tests that don't adhere to the access scope of the inner class? If it's not a static inner class, you should have an instance of the enclosing class to work from. If that's not the case, then perhaps your inner class should actually be … | |
Re: Have you set the [iCODE]build.dir[/iCODE] property in your build file? | |
Re: I agree with jwenting that a map is great for this. He already gave precise instructions on how to process the list. The rest is simply a matter of looking at the Map api for the details on the required methods. The actual code to do it is only a … | |
Re: Please note this forum is to discuss existing scripts. If you are seeking someone to do custom work for you, that belongs over in the Business Exchange looking to hire section. | |
Re: Well, I suppose you would get it like any other job - searching job listings and perhaps posting your resume in appropriate places (which would not be here by the way). | |
Re: "That's amazing. I've got the same combination on my luggage!" - President Skroob | |
Re: You can call [iCODE]setOpaque(false)[/iCODE] on the brick panel if you'd like it to be transparent. | |
Re: Well, perhaps you should post a question then? ![]() | |
Re: Ok, since there are obviously other threads already posted for this, this one doesn't really need to go any further. | |
Re: Perhaps you should read [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies#faq_keep_it_clean"]the forum rules[/URL]: [QUOTE]We strive to be a community geared towards the professional. We strongly encourage all posts to be in full-sentence English. Please do not use "leet" speak or "chatroom" speak.[/QUOTE] | |
Re: I really doubt they are going to post the source code for a problem that was posted [U]almost four years ago[/U]. | |
Re: It's always important to read announcements: [url]http://www.daniweb.com/forums/announcement6-20.html[/url] | |
Re: Take a look at [URL="http://www.php.net/manual/en/function.scandir.php"]scandir()[/URL]. | |
Re: With a text editor, of course. Why don't you write a bit of pseudocode that outlines the general process the program must follow to complete the needed steps and post it here if you need some help with portions of it? | |
Re: [QUOTE=benregn;1063715]This doesn't work, the method isn't called. Any help or pointers are welcome![/QUOTE] What makes you think the method isn't being called? I would guess that it takes about 7 seconds for that whole method to finish - and it only updates the display after it's done. If my guess … | |
Re: You have already been warned previously about starting additional threads for the same question. Just because you do not like the nature of the replies you have gotten does not mean this warrants a new thread. Closed. | |
Re: Yes. It's completely true. Run outside and panic. Also cancel your xmas plans. |
The End.