0

I have to use netbeans IDE and swing to create GUI for my application. I need several windows, one at the time. I could of course use one JFrame and set visibility of components to false once they're not needed. But I'm sure I can avoid that. Question is: how?

  • 1
    I strongly urge you to reconsider your design as it is almost guaranteed to annoy most users. How many professional applications, such as word processors or spreadsheets, throw multiple windows at the user? Yes, they do throw dialog windows when needed, but most use one single application window and then change its views as needed, something that can be done in Swing with a CardLayout, or JTabbedPane if indicated. – Hovercraft Full Of Eels Jul 12 '15 at 12:16
  • I meant the same window but other components on it. – MicrovaveProgrammer Jul 12 '15 at 13:13
  • Then the solution is as I have stated: use a CardLayout. Please check out the [CardLayout Tutorial](http://docs.oracle.com/javase/tutorial/uiswing/layout/card.html) for more on this **very** useful tool. – Hovercraft Full Of Eels Jul 12 '15 at 13:22

0 Answers0