From: Niki Roo Date: Mon, 4 May 2020 17:21:51 +0000 (+0200) Subject: PropertiesFrame: dispose on close X-Git-Tag: fanfix-swing-1.2.0~18 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=892da7f39f5ffc999422b9f37d493bb9759f5e2d;p=fanfix-swing.git PropertiesFrame: dispose on close --- diff --git a/src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java b/src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java index fe67d513..2e59e921 100644 --- a/src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java +++ b/src/be/nikiroo/fanfix_swing/gui/PropertiesFrame.java @@ -34,16 +34,16 @@ public class PropertiesFrame extends JDialog { */ public PropertiesFrame(BasicLibrary lib, MetaData meta, boolean undecorated) { - setTitle(MainFrame.trans(StringIdGui.TITLE_STORY, meta.getLuid(), + this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); + this.setUndecorated(undecorated); + this.setLayout(new BorderLayout()); + this.setTitle(MainFrame.trans(StringIdGui.TITLE_STORY, meta.getLuid(), meta.getTitle())); desc = new PropertiesPanel(lib, meta, undecorated); - setLayout(new BorderLayout()); - add(desc, BorderLayout.NORTH); - - this.setUndecorated(undecorated); + this.add(desc, BorderLayout.NORTH); - pack(); + this.pack(); this.setSize(600, getHeight()); if (!undecorated) {