How to start a new GUI form in IntelliJ IDEA?

IntelliJ IDEA uses a different approach to GUI forms, instead of  extending JFrame, it hides all GUI code in .form files and instantiates  the form in main() of Bound class.
Now for example, I have two forms in the project. Login and Page.
In any other IDE, I would have called after successful login using

Page page = new Page();

it works because Page extends JFrame class and thus has setVisible() method. But how do I do that in Intellij?

1 comment
Comment actions Permalink

Make a getter for automatically constructed JPanel from your class, then use setContentPane from the obtained JPanel for JFrame.


Please sign in to leave a comment.