Trouble adding JPanel to JFrame with NetBeans IDE
Hi, I've designed some JFrame forms in netbeans which I intended to add to the main JFrame. Then I realised thats not possible so I created a new JPanel form and then copy+pasted the contents and source code of the minor JFrame form to the JPanel form.
Now I need to add the JPanel form to the main JFrame but whatever I've tried won't get the JPanel to display... Please tell me what I am doing wrong?
I tried this way:
//productsPanel is a JPanel in the main JFrame
I also tried this:
ProductsViewer myProductsViewer = new ProductsViewer();
And I also tried to use these two methods after adding the JPanel to the JFrame:
Nothing seems to get this JPanel to show.