PDA

View Full Version : trying to add a button


surreal5335
08-14-2009, 06:00 PM
I have spent the last few hours roaming the internet and these forums looking for an answer adding a JButton, everything I try doesnt take.

So far the two pieces that have not developed any errors for is:

JButton doct_type = new javax.swing.JButton("Doct Type");

html_tab.add( new JButton( "Doct Type" ) );

these snipets are loaded into:


private void html_tabComponentAdded(java.awt.event.ContainerEvent evt) {
//JButton doct_type = new javax.swing.JButton("Doct Type");
//html_tab.add( new JButton( "Doct Type" ) );

}


Really I am trying to put some buttons inside a tabbed panel that seem to be treated JButton components.

I appreciate any help in the matter.

jolly_nikki
08-25-2009, 01:39 AM
This might help you

http://www.roseindia.net/java/example/java/swing/
http://ww.java.sun.com