From: Roland Haeder Date: Thu, 23 Jul 2015 13:26:25 +0000 (+0200) Subject: Moved default close operation into init method to keep constructors small X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5093727dbea90ca7d0eb6e4a9ee4bf51f7ce1650;p=jaddressbook-lib.git Moved default close operation into init method to keep constructors small Signed-off-by:Roland Häder --- diff --git a/Addressbook/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java b/Addressbook/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java index a8507fb9..67968464 100644 --- a/Addressbook/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java +++ b/Addressbook/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java @@ -90,9 +90,6 @@ public class AddressbookFrame extends BaseFrameworkSystem implements ClientFrame // Set frame instance this.frame = new JFrame(AddressbookApplication.printableTitle()); - // Set default close operation - this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - // Set client here this.setClient(client); } @@ -174,6 +171,9 @@ public class AddressbookFrame extends BaseFrameworkSystem implements ClientFrame // Debug line this.getLogger().trace("CALLED!"); + // Set default close operation + this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + // Register shutdown listener this.frame.addWindowListener(new WindowAdapter() { /**