Ajout des travaux effectuer
This commit is contained in:
BIN
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Boutons.class
Normal file
BIN
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Boutons.class
Normal file
Binary file not shown.
25
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Boutons.java
Normal file
25
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Boutons.java
Normal file
@@ -0,0 +1,25 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Boutons {
|
||||
public static void main(String[] args) {
|
||||
JFrame fenetre = new JFrame();
|
||||
fenetre.setSize(1040, 1000);
|
||||
fenetre.setLocation(0, 0);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
/*JButton b1 = new JButton("One");
|
||||
JButton b2 = new JButton("Two");
|
||||
JButton b3 = new JButton("Three");
|
||||
JButton b4 = new JButton("Four");
|
||||
JButton b5 = new JButton("Five");
|
||||
fenetre.add(b1, BorderLayout.CENTER);
|
||||
fenetre.add(b2, BorderLayout.CENTER);
|
||||
fenetre.add(b3, BorderLayout.CENTER);
|
||||
fenetre.add(b4, BorderLayout.CENTER);
|
||||
fenetre.add(b5, BorderLayout.CENTER);*/
|
||||
JLabel etiquette = new JLabel("Hola quetale ! No abla espagnol!dlfihqsuio rgynklrgh,ektuctucçfiehsgfeuc(ruzertxetjerh,fhfzgfe,rftgekgfkey,rdf,dg,fgzeuy");
|
||||
etiquette.setHorizontalAlignment(JLabel.CENTER);
|
||||
fenetre.add(etiquette, BorderLayout.CENTER);
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
||||
BIN
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Choix.class
Normal file
BIN
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Choix.class
Normal file
Binary file not shown.
18
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Choix.java
Normal file
18
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Choix.java
Normal file
@@ -0,0 +1,18 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Choix {
|
||||
public static void main(String[] args) {
|
||||
JFrame fenetre = new JFrame();
|
||||
fenetre.setSize(1040, 1000);
|
||||
fenetre.setLocation(0, 0);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
JRadioButton gri = new JRadioButton("Gryffondor");
|
||||
JRadioButton ser = new JRadioButton("Serpentard");
|
||||
JRadioButton serd = new JRadioButton("Serdaigle");
|
||||
fenetre.add(gri, BorderLayout.NORTH);
|
||||
fenetre.add(ser, BorderLayout.CENTER);
|
||||
fenetre.add(serd, BorderLayout.SOUTH);
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
||||
BIN
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Saisie.class
Normal file
BIN
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Saisie.class
Normal file
Binary file not shown.
20
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Saisie.java
Normal file
20
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Saisie.java
Normal file
@@ -0,0 +1,20 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Saisie {
|
||||
public static void main(String[] args) {
|
||||
JFrame fenetre = new JFrame();
|
||||
fenetre.setSize(1040, 1000);
|
||||
fenetre.setLocation(0, 0);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
JTextField f = new JTextField("LOL");
|
||||
f.setBackground(new Color(192, 192, 192));
|
||||
f.setForeground(new Color(0, 255, 0));
|
||||
JTextArea area = new JTextArea("CHEH");
|
||||
area.setBackground(new Color(0, 0, 0));
|
||||
area.setForeground(new Color(0, 255, 0));
|
||||
fenetre.add(f, BorderLayout.SOUTH);
|
||||
fenetre.add(area, BorderLayout.CENTER);
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
||||
BIN
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Sirocco.class
Normal file
BIN
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Sirocco.class
Normal file
Binary file not shown.
21
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Sirocco.java
Normal file
21
23DEV1.1/TPS2/TP01/ComposantsGraphiques/Sirocco.java
Normal file
@@ -0,0 +1,21 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Sirocco {
|
||||
public static void main(String[] args) {
|
||||
// un objet pour servir de fenetre
|
||||
JFrame fenetre = new JFrame();
|
||||
// on configure la fenetre
|
||||
fenetre.setSize(500, 300);
|
||||
fenetre.setLocation(0, 0);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
// un composant pour afficher du texte
|
||||
JLabel etiquette = new JLabel("Sirocco");
|
||||
// on configure l'etiquette
|
||||
etiquette.setHorizontalAlignment(JLabel.RIGHT);
|
||||
// on ajoute le composant dans la fenetre, au milieu
|
||||
fenetre.add(etiquette, BorderLayout.SOUTH);
|
||||
// et on montre le resultat
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user