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
b67e4485
Commit
b67e4485
authored
Jun 23, 2021
by
Jérémie
Browse files
message si fr ou belge (0-3)
parent
b6061be6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/vue/FenetreConnexion.java
View file @
b67e4485
...
...
@@ -24,6 +24,7 @@ public class FenetreConnexion extends JFrame {
private
JLabel
choixDisposition
;
private
JButton
france
;
private
JButton
belgique
;
private
JTextArea
textePays
;
public
FenetreConnexion
(
String
titre
){
super
(
titre
);
...
...
@@ -111,14 +112,17 @@ public class FenetreConnexion extends JFrame {
est
.
add
(
france
);
est
.
add
(
belgique
);
principal
.
add
(
est
,
BorderLayout
.
EAST
);
textePays
=
new
JTextArea
(
"La flotte de votre pays"
,
800
,
20
);
textePays
.
setEditable
(
false
);
textePays
.
add
(
new
ScrollPane
());
est
.
add
(
textePays
);
principal
.
add
(
est
,
BorderLayout
.
EAST
);
/*
rejoindre.addActionListener(new ActionListener() {
rejoindre
.
addActionListener
(
new
ActionListener
()
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
PremiereFenetre
.
close
();
...
...
@@ -128,9 +132,25 @@ public class FenetreConnexion extends JFrame {
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