Closed WolfgangFahl closed 6 years ago
Here is my patch - to avoid the non existence of the tabbedPain already construct it when the panel is constructed ... just move the new call a few lines up ....
diff --git a/src/main/java/org/jmeld/ui/JMeldPanel.java b/src/main/java/org/jmeld/ui/JMeldPanel.java
index 7aa9318..2c883e3 100644
--- a/src/main/java/org/jmeld/ui/JMeldPanel.java
+++ b/src/main/java/org/jmeld/ui/JMeldPanel.java
@@ -84,7 +84,8 @@ public class JMeldPanel extends JPanel implements ConfigurationListenerIF {
SHOW_FILE_STATUSBAR_OPTION = new Option(this, true);
STANDALONE_INSTALLKEY_OPTION = new Option(this, false);
actions = new Actions();
- }
+ tabbedPane = new JideTabbedPane();
+ }
public JideTabbedPane getTabbedPane() {
return tabbedPane;
@@ -97,7 +98,6 @@ public class JMeldPanel extends JPanel implements ConfigurationListenerIF {
started = true;
- tabbedPane = new JideTabbedPane();
getTabbedPane().setFocusable(false);
getTabbedPane().setShowCloseButtonOnTab(true);
getTabbedPane().setShowCloseButtonOnSelectedTab(true);
I need to check it.
No problem with apply your patches, but would be easy to review from a PR
See now we have jemmy to test GUI components, so you can wrap this into a test (I will try to cover it with a test, just mention if you want to try yourself)
Can't see how to reproduce this, but anyway, it makes sense, so this should be fixed on 6d6e9e2
the tabbedPane is null in my case here ..
also the catch for this only does a printStackTrace ...
how can this be avoided - a more robust solution created?