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
26d04b55
Commit
26d04b55
authored
Jun 23, 2021
by
E194212A
Browse files
Modification FentreConnexion
parent
88d79ec1
Changes
4
Hide whitespace changes
Inline
Side-by-side
out/production/battleship-student-project-2021/Application.class
View file @
26d04b55
No preview for this file type
out/production/battleship-student-project-2021/vue/FenetreConnexion.class
View file @
26d04b55
No preview for this file type
src/Application.java
View file @
26d04b55
...
...
@@ -11,12 +11,6 @@ import vue.FenetreConnexion;
import
java.awt.*
;
import
java.util.ArrayList
;
/**
* La classe Application du projet.
*
* @author Maeva Billaut
* @version 1.0
*/
public
class
Application
{
//http://37.187.38.219/api/v0
...
...
@@ -28,7 +22,6 @@ public class Application {
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
{
FenetreConnexion
fc
=
new
FenetreConnexion
(
"Connexion au serveur et aux parties"
);
// http://172.26.82.18//api/v0 (URL à changer si ca ne marche pas)
fc
.
setPreferredSize
(
new
Dimension
(
700
,
700
));
//fc.setResizable(false);
...
...
@@ -68,17 +61,6 @@ public class Application {
Network
.
initNewGame
(
url
,
jaquie
,
fleet
);
}
catch
(
UnirestException
e
)
{
e
.
printStackTrace
();}
catch
(
UncompleteFleetException
e
)
{
e
.
printStackTrace
();}
catch
(
BadCoordException
e
)
{
e
.
printStackTrace
();}
/*
1 si la partie est correctement initiée par le joueur courant ;
-1 si la partie est correctement initiée par un autre joueur ;
...
...
src/vue/FenetreConnexion.java
View file @
26d04b55
...
...
@@ -20,13 +20,15 @@ public class FenetreConnexion extends JFrame {
private
JButton
creerPartie
;
private
JTextArea
zoneMessage
;
public
FenetreConnexion
(
String
titre
){
super
();
super
(
titre
);
JPanel
principal
=
new
JPanel
(
new
BorderLayout
());
this
.
setContentPane
(
principal
);
JPanel
north
=
new
JPanel
(
new
FlowLayout
());
pseudo
=
new
JTextField
(
"Pseudo"
);
JLabel
labelpseudo
=
new
JLabel
(
"Pseudo : "
);
north
.
add
(
labelpseudo
);
pseudo
=
new
JTextField
();
pseudo
.
setPreferredSize
(
new
Dimension
(
100
,
30
));
envoyepseudo
=
new
JButton
(
"Connexion"
);
envoyepseudo
.
setPreferredSize
(
new
Dimension
(
100
,
30
));
...
...
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