35 lines
1018 B
Java
35 lines
1018 B
Java
|
package tests;
|
||
|
|
||
|
import javax.swing.*;
|
||
|
import java.awt.*;
|
||
|
import java.awt.event.ActionEvent;
|
||
|
|
||
|
public class Debut {
|
||
|
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();
|
||
|
etiquette.setHorizontalAlignment(JLabel.RIGHT);
|
||
|
etiquette.setVerticalAlignment(JLabel.BOTTOM);
|
||
|
fenetre.add(etiquette, BorderLayout.CENTER);
|
||
|
|
||
|
JButton Nouveau = new JButton("Nouvelle Partie");
|
||
|
etiquette.setHorizontalAlignment(JLabel.RIGHT);
|
||
|
etiquette.setVerticalAlignment(JLabel.BOTTOM);
|
||
|
fenetre.add(etiquette, BorderLayout.SOUTH);
|
||
|
|
||
|
fenetre.setVisible(true);
|
||
|
|
||
|
/*
|
||
|
* public void actionPerformed(ActionEvent e){
|
||
|
* String action=e.getActionCommand();
|
||
|
* if(action.equals("Nouvelle Partie")){
|
||
|
* // Do something
|
||
|
* }
|
||
|
*/
|
||
|
}
|
||
|
}
|