Commit dddc7e01 authored by Benjamin VU's avatar Benjamin VU
Browse files

Fenetre Connexion

parent 29de5c3e
......@@ -23,7 +23,7 @@ public class Application {
FenetreConnexion fc = new FenetreConnexion("Connexion au serveur et aux parties");
fc.setPreferredSize(new Dimension(700, 700));
fc.setPreferredSize(new Dimension(1000, 700));
//fc.setResizable(false);
fc.pack();
fc.setVisible(true);
......
......@@ -10,6 +10,7 @@ import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.function.BiPredicate;
public class FenetreConnexion extends JFrame {
private JTextField pseudo;
......@@ -19,6 +20,11 @@ public class FenetreConnexion extends JFrame {
private JButton rejoindre;
private JButton creerPartie;
private JTextArea zoneMessage;
private JLabel choixDisposition;
private JButton france;
private JButton belgique;
public FenetreConnexion(String titre){
super(titre);
......@@ -30,10 +36,9 @@ public class FenetreConnexion extends JFrame {
north.add(labelpseudo);
pseudo = new JTextField();
pseudo.setPreferredSize(new Dimension(100,30));
envoyepseudo = new JButton("Connexion");
envoyepseudo.setPreferredSize(new Dimension(100,30));
north.add(pseudo);
north.add(envoyepseudo);
//north.add(envoyepseudo);
principal.add(north,BorderLayout.NORTH);
JPanel grille = new JPanel();
......@@ -63,23 +68,46 @@ public class FenetreConnexion extends JFrame {
}
principal.add(grille,BorderLayout.CENTER);
JPanel bas = new JPanel(new BorderLayout());
envoyepseudo = new JButton("Valider pseudo et flotte");
envoyepseudo.setPreferredSize(new Dimension(100,30));
bas.add(envoyepseudo,BorderLayout.CENTER);
zoneMessage = new JTextArea("ZONE MESSAGE \n pseudo et flotte");
zoneMessage.setPreferredSize(new Dimension(100,50));
zoneMessage.setEditable(false);
bas.add(zoneMessage,BorderLayout.NORTH);
principal.add(bas, BorderLayout.SOUTH);
JPanel est = new JPanel(new GridLayout(10,1));
pInitialise = new JComboBox();
bas.add(pInitialise,BorderLayout.NORTH);
est.add(pInitialise);
JPanel boutons = new JPanel(new FlowLayout());
rejoindre = new JButton("Rejoindre");
creerPartie = new JButton("Créer partie");
boutons.add(rejoindre);
boutons.add(creerPartie);
bas.add(boutons,BorderLayout.CENTER);
est.add(boutons);
choixDisposition = new JLabel("Quelle dispositions voulez-vous choisir ?");
est.add(choixDisposition);
france = new JButton("France");
belgique = new JButton("Belgique");
est.add(france);
est.add(belgique);
principal.add(est,BorderLayout.EAST);
zoneMessage = new JTextArea("ZONE MESSAGE");
zoneMessage.setPreferredSize(new Dimension(100,100));
bas.add(zoneMessage,BorderLayout.SOUTH);
rejoindre.addActionListener(new ActionListener() {
/*rejoindre.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
FenetreJeux fJeux = new FenetreJeux();
......@@ -88,15 +116,9 @@ public class FenetreConnexion extends JFrame {
fJeux.setVisible(true);
}
});
principal.add(bas,BorderLayout.SOUTH);
});*/
JPanel vide = new JPanel(new FlowLayout());
principal.add(vide,BorderLayout.WEST);
JPanel vide2 = new JPanel(new FlowLayout());
principal.add(vide,BorderLayout.EAST);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment