getContainer in a JFrame
804807Oct 12 2010 — edited Oct 23 2010Hi,
I recently wrote a JFrame based app that added components (eg. pushbuttons and JPanels) directly to the JFrame object.
This all seemed to work.
The only time I hit a problem was when I tried to change the panel and the remove API didn't work.
I then discovered that I should do a getContentPane and add the components to that.
So, what are the other side effects that I would/could have encountered had I left my code adding components directly to the JFrame object?
Thanks
Gary