K. Tsang wrote:Since you set the layout for the JPanel to null, I don't know you how the table and button will show up, if it will show up.
Since the bounds of the JList (not table) and JButton have been set, they will show up. That said, it is much better for mike to learn and use an appropriate
layout manager.
mike, I see a lot of stuff in that code that the author *probably* thought would serve as a learning aid, stuff that you would need to un-learn as quickly as possible once you get familiar with Swing coding. For example,
testing the ID of an ActionEvent -- it will
always be equal to ActionEvent.ACTION_PERFORMED, so the test is redundant. Then,
KeyEvent provides API for
getKeyModifiersText(...) so there's really no need to roll your own.
Have you discovered the Oracle tutorials? There's a very good section on
Creating a GUI With Swing (but skip the section on NetBeans).
And welcome again!