java - problem with putting things inside a tabbed pane -


I need to put check boxes inside the tabbed pens, but they always go outwards like this

I want to insert the murder check box inside the input tab This is in my code

  import model. *; Import java.awt. *; Import javax.swing. *; JPNEL in public class panel (JPNL panel = new JPNL); Public panel (prison imprisonment) {setup}; Construction (jail); } Private zero setup () {setBorder (BorderFactory.createLineBorder (Color.blue)); Setout (new grid layout (1, 1)); } Private Zero Construction (Prison Gel) {JetBuddPan Tab = New JetBubben (); Tab.addTab ("input", blank, blank, "input"); JCheckBox Crime = New JCheckBox ("Murder"); (Crime); Tab.addTab ("display", blank, blank, "display"); (Tab); }  

}

How can I fix this?

You need to create a panel with the button you want.

  JPanel panel = new JPNL (); Panel.add (crime); Tab.addTab ("Input", blank, panel, "input");  

This button should be placed in tabkin.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -