Bonus Ginsu Knives!

My Very Own Console

It may not be the best in Console you've ever used (and you may already have one) but it works. I modified it from code by RJHM van den Bergh (see source file) to track text as added and to give the text a little breathing room around the edges, and to not have a ridiculously huge clear button.



Getting Resources

Have you ever packaged your executable JAR file only to find that your good ole "new File(fileNameString)" methods just don't seem to work anymore? This is a problem with accessing resources, since the addressing of files within a JAR archive is a little strange (e.g. jar:file:/pathToJar/yourJar.jar!/pathToResource/resource). The way to do this right is by using ClassLoaders. Things get worse if you want to bundle your code as an OSX app or Windows EXE. I think I've figured this out in a relatively simple way that will let you generate appropriate class files for the APP or EXE by changing a single flag in Info.java. To take advantage of this, use an instance of my ResourceGetter class to get your JPGs, PNGs, TXTs, etc.



Check If Parameter File is an Imposter

There are static classes in Info.java to check if any line of a File or big String starts with Info.appParamID. You can use them in your code to check a File or String before attempting to load it (if you adopt this appParamID idea). Info.java contains a method called "getKeyString()" which returns Info.appParamID.