Saturday, February 18, 2012

JPanels in JFrames Netbeans

When using Netbeans, how can someone put a JPanel inside a JFrame. I have been trying different methods to put a JPanel class that I created into a JFrame class that was made from Netbeans. Unfortunately, as Netbeans do a lot of background programming and packing at the end, I was unable to do it manually using simple commands such as add(container panel) ..

It turns out, the simplest way to add a panel  into a Netbeans JFrame is to drag it from the left hand side of the screen to the JFrame dialog on the right hand of the screen. Go Figure ... >.>

No comments:

Post a Comment