Permalink
Browse files

Added recieveObject() on some methods

  • Loading branch information...
1 parent eeb274a commit 0193bacc902a7b2431fb146e875f480b64bbeeca @cfroystad cfroystad committed Mar 27, 2012
Showing with 11 additions and 4 deletions.
  1. +11 −4 src/gui/EventWindow.java
View
@@ -342,7 +342,8 @@ public void actionPerformed(ActionEvent arg0) {
setValues(event);
addToDatabase(event);
- HomeScreen.redraw();
+ HomeScreen parent = HomeScreen.getInstance();
+ parent.reDraw();
Container frame = opprettButton.getParent();
do frame = frame.getParent();
@@ -400,11 +401,14 @@ public void actionPerformed(ActionEvent e){
ClientConnection clientConnection = ClientConnection.getInstance();
if(event.getId() != 0) {
clientConnection.send(new APICall.UpdateEvent(event));
+ clientConnection.receiveObject();
} else {
clientConnection.send(new APICall.AddEvent(event));
+ clientConnection.receiveObject();
}
- HomeScreen.redraw();
+ HomeScreen parent = HomeScreen.getInstance();
+ parent.reDraw();
Container frame = okButton.getParent();
do frame = frame.getParent();
@@ -421,7 +425,8 @@ public void actionPerformed(ActionEvent arg0) {
clientConnection.send(new APICall.DeclineEvent(eventId));
- HomeScreen.redraw();
+ HomeScreen parent = HomeScreen.getInstance();
+ parent.reDraw();
Container frame = avslagButton.getParent();
do frame = frame.getParent();
@@ -438,8 +443,10 @@ public void actionPerformed(ActionEvent arg0) {
ClientConnection clientConnection = ClientConnection.getInstance();
clientConnection.send(new APICall.AcceptEvent(eventId));
+ clientConnection.receiveObject();
- HomeScreen.redraw();
+ HomeScreen parent = HomeScreen.getInstance();
+ parent.reDraw();
Container frame = godtaButton.getParent();
do frame = frame.getParent();

0 comments on commit 0193bac

Please sign in to comment.