Developpement/23DEV1.1/TPS2/TP01/ComposantsGraphiques/Boutons.java

25 lines
968 B
Java
Raw Normal View History

2024-12-09 11:53:11 +01:00
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);
}
}