correctif et debut gui
This commit is contained in:
parent
ee99ac0ae2
commit
2a82719e38
BIN
JAVA/PROJET-PMT_STRI1A/src/gson-2.6.2.jar
Executable file
BIN
JAVA/PROJET-PMT_STRI1A/src/gson-2.6.2.jar
Executable file
Binary file not shown.
60
JAVA/PROJET-PMT_STRI1A/src/gui/jeu.java
Normal file
60
JAVA/PROJET-PMT_STRI1A/src/gui/jeu.java
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package gui;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.GraphicsConfiguration;
|
||||
import java.awt.HeadlessException;
|
||||
import java.nio.file.attribute.AclEntry.Builder;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
|
||||
/**
|
||||
* @author nicolas
|
||||
*
|
||||
*/
|
||||
public class jeu extends JFrame {
|
||||
|
||||
|
||||
public jeu() {
|
||||
super();
|
||||
build();
|
||||
}
|
||||
|
||||
public void build() {
|
||||
setTitle("Jeu");
|
||||
setSize(800,600);
|
||||
setLocationRelativeTo(null);
|
||||
setResizable(false);
|
||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
JPanel center = new JPanel();
|
||||
Dimension taille = new Dimension(200,200);
|
||||
center.setPreferredSize(taille);
|
||||
center.add(new JButton("Jouer"));
|
||||
this.setLayout(new BorderLayout());
|
||||
this.getContentPane().add(buildContentPane(), BorderLayout.NORTH);
|
||||
this.getContentPane().add(center, BorderLayout.CENTER);
|
||||
|
||||
}
|
||||
public JPanel buildContentPane() {
|
||||
JPanel panel =new JPanel();
|
||||
Dimension preferredSize = new Dimension(200,200);
|
||||
panel.setLayout(new FlowLayout());
|
||||
JLabel label = new JLabel("Jeu Dragon Donjon");
|
||||
panel.add(label);
|
||||
return panel;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
31
JAVA/PROJET-PMT_STRI1A/src/gui/main.java
Normal file
31
JAVA/PROJET-PMT_STRI1A/src/gui/main.java
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package gui;
|
||||
|
||||
import java.awt.Dialog;
|
||||
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
/**
|
||||
* @author nicolas
|
||||
*
|
||||
*/
|
||||
public class main {
|
||||
|
||||
/**
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
SwingUtilities.invokeLater(new Runnable(){
|
||||
public void run(){
|
||||
//On crée une nouvelle instance de notre JDialog
|
||||
jeu fenetre = new jeu();
|
||||
fenetre.setVisible(true);//On la rend visible
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
BIN
JAVA/PROJET-PMT_STRI1A/src/javatuples-1.2.jar
Executable file
BIN
JAVA/PROJET-PMT_STRI1A/src/javatuples-1.2.jar
Executable file
Binary file not shown.
BIN
JAVA/PROJET-PMT_STRI1A/src/jdbc.jar
Executable file
BIN
JAVA/PROJET-PMT_STRI1A/src/jdbc.jar
Executable file
Binary file not shown.
BIN
JAVA/PROJET-PMT_STRI1A/src/org.eclipse.swt-3.3.2.jar
Normal file
BIN
JAVA/PROJET-PMT_STRI1A/src/org.eclipse.swt-3.3.2.jar
Normal file
Binary file not shown.
BIN
JAVA/PROJET-PMT_STRI1A/src/org.eclipse.swt-3.3.21.jar
Normal file
BIN
JAVA/PROJET-PMT_STRI1A/src/org.eclipse.swt-3.3.21.jar
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user