Skip to content
Snippets Groups Projects
Commit 5cdb9108 authored by Eldar Kurmakaev's avatar Eldar Kurmakaev
Browse files

Changed the join method to send over a reference of the ClientUpdate Interface

parent 7af6d7e9
No related branches found
No related tags found
No related merge requests found
...@@ -48,30 +48,6 @@ public class ChatScreen { ...@@ -48,30 +48,6 @@ public class ChatScreen {
// SwingUtilities.getRootPane(sendButton).setDefaultButton(sendButton); // SwingUtilities.getRootPane(sendButton).setDefaultButton(sendButton);
} }
frame.addWindowListener(new WindowAdapter()
{
@Override
public void windowClosing(WindowEvent arg0)
{
int answer = JOptionPane.showConfirmDialog(null,
"Are you sure you want to quit the session?",
"Shut down session", JOptionPane.YES_NO_OPTION);
System.out.println(answer);
if (answer == 0)
{
System.out.println("Quitting session");
try
{
client.getClientController().quit(client.getUserName());
}
catch (RemoteException e)
{
e.printStackTrace();
}
System.exit(0);
}
}
});
public JButton getSendButton() { public JButton getSendButton() {
return sendButton; return sendButton;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment