Adding jpanels to existing frame
cbyron2003 <[email protected]> Sat, 2 Feb 2008 06:32:35 -0800 (PST)
| Newsgroups | gmane.comp.java.netbeans.user-interface |
|---|---|
| Message-ID | <[email protected]> |
Hi all. Just looking for some advice regarding a UI i am producing using netbeans. Not sure if this is neing posted in correct area so if not either move it or let me know and i will repost elsewhere. I have a jframe which consists of a jpanel and a button. I also have a seperate class which produces another jPanel. When the button is clicked in the original jframe i want to replace the first jpanel with the second. I had thought that when the button was clicked I could simply do a 1stPanel.add(2ndPanel) and then a repaint() but this is not working. I think that something needs to change in the layout manager but as netbeans creates this I am not sure how or what to change. I will eventually have several classes all creating independent Jpanels and I would like to add these to my original frame as and when i require them so any help or ideas and hw this might be done would be greatly appreciated. Thanks -- View this message in context: http://www.nabble.com/Adding-jpanels-to-existing-frame-tp15243300p15243300.html Sent from the Netbeans - UI mailing list archive at Nabble.com.