How to Integrate Multi-page Java Desktop Application from Multiple GUI Classes

前端 未结 3 1949
面向向阳花
面向向阳花 2021-01-14 11:03

I am working on a Java Swing desktop application project. The application has about 15 GUI pages. I can use Layered Panes and Tabbed Panes to put all the GUI components in

3条回答
  •  半阙折子戏
    2021-01-14 11:33

    You have a couple of options:

    1. You can hide the old JFrame with setVisible(false)
    2. You can get rid of the old JFrame with dispose()

    You can get some more information on these methods and how they should be called here: http://docs.oracle.com/javase/6/docs/api/javax/swing/JFrame.html

    Hope this helps!

提交回复
热议问题