Skip to content
Snippets Groups Projects
Commit a24c8334 authored by Ho Dac Hai's avatar Ho Dac Hai
Browse files

Merge branch 'hai' into 'master'

Replace ChatScreen.java

See merge request !23
parents 7af6d7e9 1776e629
No related branches found
No related tags found
3 merge requests!25Master,!24Master,!23Replace ChatScreen.java
......@@ -43,35 +43,13 @@ public class ChatScreen {
public ChatScreen(Client client)
{
this.client = client;
exitThisRoomButton.addActionListener(actionListener);
sendButton.addActionListener(actionListener);
yourNameDisplay.setText(client.getUserName());
// drawingPanel = new PaintGUI(client);
// 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() {
return sendButton;
......@@ -92,7 +70,6 @@ public class ChatScreen {
// }
ActionListener actionListener = new ActionListener()
{
public void actionPerformed(ActionEvent e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment