|
From: Frederick W. <fre...@us...> - 2012-02-19 12:21:52
|
rails/ui/swing/ReportWindowDynamic.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 5467d59293b48a45470ccf779b84520040495ffa
Author: Frederick Weld <fre...@gm...>
Date: Sun Feb 19 13:19:39 2012 +0100
Fixed order of initing DynamicReportWindow (pack only after layout done)
Found out issue when running on other computer:
Report window gets zero size.
This commit fixes this issue which was traced back to a premature
call of super.init to the AbstractReportWindow's pack - dyn report
window only sets up layout afterwards (against EDT rules).
This is fixed by postponing the super.init call to the point in time
when the layout is ready.
diff --git a/rails/ui/swing/ReportWindowDynamic.java b/rails/ui/swing/ReportWindowDynamic.java
index 00daad2..df789f8 100644
--- a/rails/ui/swing/ReportWindowDynamic.java
+++ b/rails/ui/swing/ReportWindowDynamic.java
@@ -55,8 +55,6 @@ public class ReportWindowDynamic extends AbstractReportWindow implements Action
@Override
public void init() {
- super.init();
-
setLayout(new BorderLayout());
JPanel messagePanel = new JPanel();
@@ -142,6 +140,8 @@ public class ReportWindowDynamic extends AbstractReportWindow implements Action
);
buttonPanel.add(commentButton);
+ super.init();
+
}
@Override
|