Results 1 to 2 of 2
- 05-23-2011, 10:16 PM #1
- Join Date
- Mar 2011
- London, UK
- Blog Entries
- Rep Power
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.
- 05-23-2011, 10:35 PM #2
- By razmyasdfg in forum AWT / SwingReplies: 8Last Post: 05-23-2011, 11:03 PM
- By trishtren in forum AWT / SwingReplies: 7Last Post: 04-05-2011, 06:52 PM
- By Manfizy in forum AWT / SwingReplies: 4Last Post: 03-05-2011, 10:34 PM
- By navid in forum New To JavaReplies: 2Last Post: 12-18-2010, 04:26 PM
- By ineedhelp in forum New To JavaReplies: 2Last Post: 03-13-2009, 06:56 PM