Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
COMP90015-DSAss2-InfinityMonkeys-remaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ho Dac Hai
COMP90015-DSAss2-InfinityMonkeys-remaster
Commits
1776e629
There was an error fetching the commit references. Please try again later.
Commit
1776e629
authored
Oct 21, 2019
by
Ho Dac Hai
Browse files
Options
Downloads
Patches
Plain Diff
Replace ChatScreen.java
parent
81e002f6
No related branches found
No related tags found
2 merge requests
!25
Master
,
!23
Replace ChatScreen.java
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/GUI/ChatScreen.java
+3
-26
3 additions, 26 deletions
src/GUI/ChatScreen.java
with
3 additions
and
26 deletions
src/GUI/ChatScreen.java
+
3
−
26
View file @
1776e629
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment