13 Fevrier
This commit is contained in:
BIN
DEV2.1/TP1:ComposantsGraphiques/Boutons.class
Normal file
BIN
DEV2.1/TP1:ComposantsGraphiques/Boutons.class
Normal file
Binary file not shown.
24
DEV2.1/TP1:ComposantsGraphiques/Boutons.java
Normal file
24
DEV2.1/TP1:ComposantsGraphiques/Boutons.java
Normal file
@@ -0,0 +1,24 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Boutons {
|
||||
public static void main(String[] args) {
|
||||
JFrame fenetre = new JFrame();
|
||||
JPanel pan = new JPanel();
|
||||
fenetre.setSize(400, 200);
|
||||
fenetre.setLocation(0, 0);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
JButton bouton1 = new JButton();
|
||||
JButton bouton2 = new JButton();
|
||||
JButton bouton3 = new JButton();
|
||||
JButton bouton4 = new JButton();
|
||||
JButton bouton5 = new JButton();
|
||||
pan.add(bouton1);
|
||||
pan.add(bouton2);
|
||||
pan.add(bouton3);
|
||||
pan.add(bouton4);
|
||||
pan.add(bouton5);
|
||||
fenetre.setContentPane(pan);
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
BIN
DEV2.1/TP1:ComposantsGraphiques/Sirocco.class
Normal file
BIN
DEV2.1/TP1:ComposantsGraphiques/Sirocco.class
Normal file
Binary file not shown.
16
DEV2.1/TP1:ComposantsGraphiques/Sirocco.java
Normal file
16
DEV2.1/TP1:ComposantsGraphiques/Sirocco.java
Normal file
@@ -0,0 +1,16 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Sirocco {
|
||||
public static void main(String[] args) {
|
||||
JFrame fenetre = new JFrame();
|
||||
fenetre.setSize(500, 300);
|
||||
fenetre.setLocation(0, 0);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
JLabel etiquette = new JLabel("Sirocco");
|
||||
etiquette.setHorizontalAlignment(JLabel.RIGHT);
|
||||
etiquette.setVerticalAlignment(JLabel.BOTTOM);
|
||||
fenetre.add(etiquette, BorderLayout.CENTER);
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user