30 lines
734 B
Java
30 lines
734 B
Java
|
//MELIANI SAMY (TP1)
|
||
|
|
||
|
import javax.swing.*;
|
||
|
import java.awt.*;
|
||
|
public class Directions {
|
||
|
public static void main(String[] args) {
|
||
|
// un objet pour servir de fenetre
|
||
|
JFrame fenetre = new JFrame();
|
||
|
// on configure la fenetre
|
||
|
fenetre.setSize(800, 800);
|
||
|
fenetre.setLocation(0, 0);
|
||
|
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||
|
|
||
|
GridLayout layout = new GridLayout(2, 2);
|
||
|
|
||
|
|
||
|
fenetre.setLayout(layout);
|
||
|
fenetre.add(new Button("◤"));
|
||
|
fenetre.add(new Button("◥"));
|
||
|
fenetre.add(new Button("◣"));
|
||
|
fenetre.add(new Button("◢"));
|
||
|
layout.setHgap(500);
|
||
|
layout.setVgap(500);
|
||
|
layout.setAlignment(100);
|
||
|
fenetre.setVisible(true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|