Controle machine
This commit is contained in:
31
DEV2.1/CM1/03_Compteur/Fenetre.java
Normal file
31
DEV2.1/CM1/03_Compteur/Fenetre.java
Normal file
@@ -0,0 +1,31 @@
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
|
||||
public class Fenetre extends JFrame {
|
||||
|
||||
public Fenetre() {
|
||||
this.setSize(250, 300);
|
||||
this.setLocation(100, 100);
|
||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
this.setLayout(new BorderLayout());
|
||||
|
||||
JPanel panneauHaut = new JPanel();
|
||||
JPanel panneauBas = new JPanel();
|
||||
JPanel panneauMilieu = new JPanel();
|
||||
|
||||
JButton boutonHaut = new JButton("\u25B2");
|
||||
JButton boutonBas = new JButton("\u25BC");
|
||||
Six imageSix = new Six();
|
||||
|
||||
boutonHaut.setHorizontalAlignment(JButton.CENTER);
|
||||
boutonBas.setHorizontalAlignment(JButton.CENTER);
|
||||
|
||||
panneauHaut.add(boutonHaut);
|
||||
panneauBas.add(boutonBas);
|
||||
panneauMilieu.add(imageSix);
|
||||
|
||||
this.add(panneauHaut, BorderLayout.NORTH);
|
||||
this.add(panneauBas, BorderLayout.SOUTH);
|
||||
this.add(imageSix, BorderLayout.CENTER);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user