|NONE! All I ask is that if you make any improvements to any of these classes, please email the changes to me so I can share the changes with the world. AND….If you find the class useful, I’d appreciate an email simply saying “Thanks”.|
|Splash.java – A Java Splash Screen|
This is a single class that implements a splash screen in Java/Swing. It’s really easy to use. You simply create a new Splash() when you want to show a splash screen. Parameters to the constructor are:
imageName – can be an image on the local drive or anywhere on the classpath
theWaitTime – the time, in seconds, to display the splash screen
allowClick – a boolean indicating whether or not to allow clicking the splash screen to get rid of it
Here is an example of using it:
|OrderedProperties.java – Properties in alphabetical order|
This is a single class that extends java.util.Properties and adds one thing to it – when you call the store() method, it writes the properties in alphabetical order. This might not seem like a big deal, but if you have a .properties file with a number of properties, trying to find the one you want when it’s not alphabetized can be a pain.
Simply use this as you would a normal Properties object.
|wget.java – a Java implementation of wget|
| This is a single class that does one thing – it can grab the contents at a URL and save it to your local machine (it just does an HTTP GET and saves the results). Simply give it a URL and a filename to save to and it will do the rest. Useful on Unix boxes when you don’t have access to lynx or wget or curl. Also useful just to see how to do this in java – doing this in your own program can be done by applying the techniques used in this code.
Usage: java wget URL localfilename