Please
Use A Meaningful Subject Line. About 90% of all threads in this forum is about Swing.
As for an answer:
- A JFrame is a subclass of Frame which is a subclass of Window. It is meant to be a toplevel component, meaning it is its own window.
- A JPanel is a container that must be put in another container or window. Without a parent window (either directly or indirectly; dialogs are windows too) it cannot be displayed.
- A Container is an AWT class and should therefore not be used in Swing. A JPanel is an indirect subclass of Container so use JPanel instead.
Also check out the Javadoc pages of all three and their super classes.