|
Hi, I'm a student that's working on a research project for my university. The project is basically to convert some GA software over from VC++ into Java+MATLAB, while optomizing the code and fixing the bugs. Currently I'm working on redesigning the interface for the program, and I was wondering if I could get any 'efficiency suggestions' from you guys, the pros. ;)
Currently I have the code set up to split as soon as the program runs. If there are command-line arguments it will run a command-line class, or if it's empty then it will enter into a full Swing-based GUI. The GUI class itself is starting to get bloated with all of the menu code/ActionEvents, so I was thinking about externalizing it into another class (mainly the menu action events). Also, since all classes in the program have some code that must access the main variables (number of runs, initial population, etc.), I figured I would just externalize all of those static variables into their own Vars.class file and make them public (yes, bad practice but it seems like a good idea right now). I could also do accessors and mutators with very little hassle, if needed.
So really I'm just asking what the best way to set up a good-looking and easily-extended GUI is. Personally I love to make multiple classes to keep the time spent searching for methods to a minimum, but if that is the wrong practice then please inform me.
Thank You |