Swing: click a button in a frame, show another frame with different components


I am developing an application which needs to pop up new JFrame B with different components, when I click on a button on JFrame A. How do I achieve that?

I don't want to use the tabs.

Use a JDialog , problem solved!

See this java tutorial for more help : How to Make Dialogs