1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
import java.awt.GridBagConstraints;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JPanel;
public class Buttons extends JPanel
{
Buttons()
{
//setLayout (new GridLayout(4, 1));
GridBagConstraints c = new GridBagConstraints();
setLayout (new BoxLayout(this, BoxLayout.Y_AXIS));
c.fill = GridBagConstraints.BOTH;
JButton change_properties = new JButton ("Change properties");
add(change_properties);
JButton add_vehicule = new JButton ("Add Vehicule");
add(add_vehicule);
JButton add_incident = new JButton ("Add Incident");
add(add_incident);
JButton add_building = new JButton ("Add Building");
add(add_building);
}
} |
Partager