Tony Docherty wrote:Or you could just get the selected item, use the model's clear() method to remove all the items from the list and then put the selected item back into the list.
Ulf Dittmer wrote:If you want cross-platform compatibility, use the java.util.prefs API, and you won't have to worry about where it stores anything :-)
Richard Tookey wrote:Why do you need to access a jar file from your application?
As far as making things cross-platform is concerned environmental variables are bad news since event if they exist they may not have the same name on different OS. You should try to make sure any files are in a subdirectory relative to the user's home directory or the current working directory. The home directory is always available using System.getProperty("user.home") and the working directory using System.getProperty("user.dir") . When I want to create files I usually use the home directory as the base directory since that is the only directory that is pretty much guaranteed to be writeable on all OS. If you need to create temporary files then you can also use System.getProperty("java.io.tmpdir") but remember that on some OS files in this area get remove when the system is re-started.
Paul Clapham wrote:The CLS command works for me in Windows 7. What happens when you type CLS at the command line?
(Also I will move this to the General Computing forum since it isn't about Java.)
Adam Burda wrote:Need help. This should be simple, but i can not seem to get it.
I want to take a double like 0.01 and then times it by 2 for each output.
like this....
0.01
0.02
0.04
0.08
0.16
Do i use a loop of if, else?
Thank you.