I have used the Netbeans GUI Designer to come up with a JFrame and I wish to pass in two JPanels to the 2 dummy JPanels already placed inside the JFrame using the Netbeans GUI Designer.
However, the code below doesn’t work and the JFrame comes up blank. Why is that so?
public Summary_Page(JPanel jp1,JPanel jp2) {
initComponents();
this.jp1=jp1;
this.jp2=jp2;
this.setVisible(true);
}
If this method is inside the class which extends JFrame, then just add the following line inside the Summary_Page() method: