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 26 27 28 29 30
|
public class Fenetre extends JFrame{
private JLabel info = new JLabel("Information joueur 1:");
private JLabel info1 = new JLabel("Information joueur 2:");
private JSeparator separateur = new JSeparator(SwingConstants.VERTICAL);
public Fenetre(){
JPanel right = new JPanel();
this.getContentPane().setLayout(new BorderLayout());
this.getContentPane().add(right,BorderLayout.EAST);
info.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
right.setLayout(new BoxLayout(right,BoxLayout.Y_AXIS));
right.add(info);
right.add(info1);
right.add(separateur);
right.add(new JButton("A"));
right.add(new JButton("B"));
right.add(new JButton("C"));
}
public static void main(String[]args){
Fenetre fen=new Fenetre();
fen.setVisible(true);
}
} |
Partager