|
|
@ -113,6 +113,15 @@ public class ChatWindow extends Application { |
|
|
|
@Override |
|
|
|
public void start(Stage primaryStage) { |
|
|
|
stage = primaryStage; |
|
|
|
stage.setOnCloseRequest(windowEvent -> { |
|
|
|
try { |
|
|
|
protoOut.sendPart(username); |
|
|
|
socket.close(); |
|
|
|
loginWindow.show(); |
|
|
|
} catch (IOException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
AnchorPane root = new AnchorPane(); |
|
|
|
primaryStage.setMaximized(true); |
|
|
@ -216,13 +225,6 @@ public class ChatWindow extends Application { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void stop() throws IOException { |
|
|
|
protoOut.sendPart(username); |
|
|
|
socket.close(); |
|
|
|
loginWindow.show(); |
|
|
|
} |
|
|
|
|
|
|
|
public ArrayList<String> userList; |
|
|
|
|
|
|
|
private String servername; |
|
|
|