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 Page.java after successful login using

Page page = new Page();
page.setVisible(true);

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.

0

Please sign in to leave a comment.