diff --git a/DEV.2.1/TP/TP2-CompGraphique/Boutons.java b/DEV.2.1/TP/TP2-CompGraphique/Boutons.java new file mode 100644 index 0000000..d833de6 --- /dev/null +++ b/DEV.2.1/TP/TP2-CompGraphique/Boutons.java @@ -0,0 +1,34 @@ +import javax.swing.*; +import java.awt.*; + +public class Boutons +{ + public static void main(String[] args) + { + JFrame frame = new JFrame("Boutons"); + + JButton btn1 = new JButton("Luc Hernandez prof de DEV"); + btn1.setBounds(100,100,100,40); + + JButton btn2 = new JButton("Pierre"); + btn2.setBounds(50,100,100,40); + + JButton btn3 = new JButton("Louqa"); + btn3.setBounds(150,100,100,40); + + JButton btn4 = new JButton("ok"); + btn4.setBounds(200,100,100,40); + + JButton btn5 = new JButton("bou"); + btn5.setBounds(250,100,100,40); + + frame.add(btn1); + frame.add(btn2); + frame.add(btn3); + frame.add(btn4); + frame.add(btn5); + frame.setSize(300,300); + frame.setLayout(null); + frame.setVisible(true); + } +} \ No newline at end of file diff --git a/DEV.2.1/TP/TP2-CompGraphique/Saisie.java b/DEV.2.1/TP/TP2-CompGraphique/Saisie.java new file mode 100644 index 0000000..c57aae1 --- /dev/null +++ b/DEV.2.1/TP/TP2-CompGraphique/Saisie.java @@ -0,0 +1,15 @@ +import javax.swing.JFrame; +import javax.swing.JTextField; + +public class Saisie { + public static void main(String[] args){ + JFrame fenetre = new JFrame("Saisie"); + + JTextField saisie = new JTextField(); + saisie.setColumns(0); + + frame.setSize(300,300); + frame.setLayout(null); + frame.setVisible(true); + } +} \ No newline at end of file diff --git a/DEV.2.1/TP/TP2-CompGraphique/Sirocco.class b/DEV.2.1/TP/TP2-CompGraphique/Sirocco.class new file mode 100644 index 0000000..c83df98 Binary files /dev/null and b/DEV.2.1/TP/TP2-CompGraphique/Sirocco.class differ diff --git a/DEV.2.1/TP/TP2-CompGraphique/Sirocco.java b/DEV.2.1/TP/TP2-CompGraphique/Sirocco.java new file mode 100644 index 0000000..e524972 --- /dev/null +++ b/DEV.2.1/TP/TP2-CompGraphique/Sirocco.java @@ -0,0 +1,17 @@ +import javax.swing.*; +import java.awt.*; + +public class Sirocco { + public static void main(String[] args) { + JFrame fenetre = new JFrame("Sirocco"); + fenetre.setSize(500, 300); + fenetre.setLocation(100, 100); + fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JLabel etiquette = new JLabel("Sirocco"); + etiquette.setHorizontalAlignment(JLabel.BOTTOM_ALIGNMENT); + fenetre.add(etiquette, BorderLayout.CENTER); + fenetre.setVisible(true); + + } + +}