Never derive from JDialog, JFrame or JInternalFrame for defining your forms, dialogs...
Rather derive from JPanel. This will bring you the follwing advantages:
Use layout managers. You might think it's simpler just to position everything with hard coded positions now (especially if you use a graphical layout tool), but when it comes time to update the gui, or internationalize it, your successors will hate you. (Trust me on this, I was the guy saying to use the layout managers from the start, and the successor to the guy who ignored me.)
Avoid using GUI layout designers (builders). Later on it will make your code much cleaner and easier to maintain.
I think a good working knowledge of concurrency is often understated. You really need to be familiar with Swing's threading policy and general synchronization techniques to build a responsive GUI and an efficient backend.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With