Why getContentPane()?
The HelloWorld example required us to call getContentPane() before “add()”ing an object to the frame:
myFrameInstance.getContentPane().add(myComponent);
- This differs from traditional AWT container additions, were we simply call “add”, passing in the component.
- Let’s cut a JFrame open to find out why . . .