Posts Tagged ‘other’

20Nov

Last night, as I was creating a java gui based program using netbeans I need to create dynamically generated menu items, mdi windows, and as a result classes/action listner events. I learned some cool things such as it is possible to create classes within java methods. Not only that, but you could dynamically create a thread. Still yet more fun to be had is with dynamically creating a thread not assigned to any variable/object.
I also figured out how to make my own exception classes which was pretty cool, and simplified my code significantly.

Here is my source code and executable!
There is a very simple fix to make it work on unix platforms (to save and load files).  You just need to use the File.pathSeparator stuff to get the system’s file path seperate (aka “\\” windows and “/” unix). Once again I was more concerned with making this work. Other than that it is cross platform and even uses the default window styles for every operating system.

Sorry no comments. I was in hurry. It is self commenting though!

Click here for the executable

Click here for the source code

Share