I am new to Java and Netbeans, and want to write a Swing project to learn by.
Naturally I want to separate the "guts" of the code from the GUI class. How should I go about it, best practice ?
Should I:
- Use public static void main(String[] args) in the GUI class. Then create an instance of a "controller". Calling controller functions via GUI events (passing only data) ?
- Use public static void main(String[] args) in the "controller", and pass an instance of the controller to the GUI class ?
Create instances, or use classes statically ? And what of this invokeLater business ?
[ some little code samples would be lovely ]
Thanks. Anthony.