Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tristan MAISONNEUVE
projetS2-2021-23-LJ
Commits
4d87c39c
Commit
4d87c39c
authored
Jun 23, 2021
by
Tristan MAISONNEUVE
Browse files
Merge remote-tracking branch 'origin/master'
parents
89101bba
3069afc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
out/production/battleship-student-project-2021/vue/FenetreConnexion.class
View file @
4d87c39c
No preview for this file type
src/vue/FenetreConnexion.java
View file @
4d87c39c
...
@@ -30,6 +30,7 @@ public class FenetreConnexion extends JFrame {
...
@@ -30,6 +30,7 @@ public class FenetreConnexion extends JFrame {
private
JLabel
choixDisposition
;
private
JLabel
choixDisposition
;
private
JButton
france
;
private
JButton
france
;
private
JButton
belgique
;
private
JButton
belgique
;
private
JTextArea
textePays
;
NavyFleet
flotte
=
new
NavyFleet
();
NavyFleet
flotte
=
new
NavyFleet
();
...
@@ -155,7 +156,6 @@ public class FenetreConnexion extends JFrame {
...
@@ -155,7 +156,6 @@ public class FenetreConnexion extends JFrame {
creerPartie
=
new
JButton
(
"Créer partie"
);
creerPartie
=
new
JButton
(
"Créer partie"
);
boutons
.
add
(
rejoindre
);
boutons
.
add
(
rejoindre
);
boutons
.
add
(
creerPartie
);
boutons
.
add
(
creerPartie
);
est
.
add
(
boutons
);
est
.
add
(
boutons
);
choixDisposition
=
new
JLabel
(
"Quelle dispositions voulez-vous choisir ?"
);
choixDisposition
=
new
JLabel
(
"Quelle dispositions voulez-vous choisir ?"
);
...
@@ -165,14 +165,17 @@ public class FenetreConnexion extends JFrame {
...
@@ -165,14 +165,17 @@ public class FenetreConnexion extends JFrame {
est
.
add
(
france
);
est
.
add
(
france
);
est
.
add
(
belgique
);
est
.
add
(
belgique
);
textePays
=
new
JTextArea
(
"La flotte de votre pays"
,
800
,
20
);
principal
.
add
(
est
,
BorderLayout
.
EAST
);
textePays
.
setEditable
(
false
);
textePays
.
add
(
new
ScrollPane
());
est
.
add
(
textePays
);
principal
.
add
(
est
,
BorderLayout
.
EAST
);
/*
rejoindre.addActionListener(new ActionListener() {
rejoindre
.
addActionListener
(
new
ActionListener
()
{
@Override
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
public
void
actionPerformed
(
ActionEvent
e
)
{
PremiereFenetre
.
close
();
PremiereFenetre
.
close
();
...
@@ -182,9 +185,25 @@ public class FenetreConnexion extends JFrame {
...
@@ -182,9 +185,25 @@ public class FenetreConnexion extends JFrame {
fJeux
.
setVisible
(
true
);
fJeux
.
setVisible
(
true
);
}
}
});
*/
});
france
.
addActionListener
(
new
ActionListener
()
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
france
.
setEnabled
(
false
);
belgique
.
setEnabled
(
true
);
textePays
.
setText
(
"Bateau de la france\nVous avez :\n1 porte-avions\n1 cuirassé\n2 croiseurs\n2 Torpilleur\n 1 Sous-marins"
);
}
});
belgique
.
addActionListener
(
new
ActionListener
()
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
france
.
setEnabled
(
true
);
belgique
.
setEnabled
(
false
);
textePays
.
setText
(
"Bateau de la france\nVous avez :\n1 cuirassé\n2 croiseurs\n3 Torpilleur\n 4 Sous-marins"
);
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment