private static class MenuOnlyButton extends CButton {
public MenuOnlyButton(String text, Icon icon) {
super(text, icon);
}
@Override
protected void init(CommonSimpleButtonAction action) {
CommonSimpleButtonAction replacement = new CommonSimpleButtonAction(this) {
public <V> V createView(ViewTarget<V> target, ActionViewConverter converter, Dockable dockable) {
if (target == ViewTarget.TITLE) {
return null;
}
return super.createView(target, converter, dockable);
}
};
super.init(replacement);
}
}
java.lang.StackOverflowError: null
at bibliothek.gui.dock.action.actions.AbstractStandardDockAction.<init>(AbstractStandardDockAction.java:48) ~[dockingFramesCore.jar:na]
at bibliothek.gui.dock.action.actions.SimpleDockAction.<init>(SimpleDockAction.java:51) ~[dockingFramesCore.jar:na]
at bibliothek.gui.dock.action.actions.SimpleDropDownItemAction.<init>(SimpleDropDownItemAction.java:38) ~[dockingFramesCore.jar:na]
at bibliothek.gui.dock.action.actions.SimpleButtonAction.<init>(SimpleButtonAction.java:46) ~[dockingFramesCore.jar:na]
at bibliothek.gui.dock.common.action.core.CommonSimpleButtonAction.<init>(CommonSimpleButtonAction.java:43) ~[dockingFramesCommon.jar:na]
java.lang.StackOverflowError: null
at bibliothek.gui.dock.action.actions.AbstractStandardDockAction.<init>(AbstractStandardDockAction.java:48) ~[dockingFramesCore.jar:na]
at bibliothek.gui.dock.action.actions.SimpleDockAction.<init>(SimpleDockAction.java:51) ~[dockingFramesCore.jar:na]
at bibliothek.gui.dock.action.actions.SimpleDropDownItemAction.<init>(SimpleDropDownItemAction.java:38) ~[dockingFramesCore.jar:na]
at bibliothek.gui.dock.action.actions.SimpleButtonAction.<init>(SimpleButtonAction.java:46) ~[dockingFramesCore.jar:na]
at bibliothek.gui.dock.common.action.core.CommonSimpleButtonAction.<init>(CommonSimpleButtonAction.java:43) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton$1.<init>(DockingViewWrapper.java:531) ~[CFETS_Common/:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:531) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:539) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:539) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:539) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:539) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:539) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:539) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:539) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:539) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
at com.mt.core.viewFunctionWrapper.DockingViewWrapper$MenuOnlyButton.init(DockingViewWrapper.java:539) ~[CFETS_Common/:na]
at bibliothek.gui.dock.common.action.CButton.init(CButton.java:42) ~[dockingFramesCommon.jar:na]
....................................................
There is no exception if I just call the constructor of the MenuOnlyButton. And the code of MenuOnlyButton and CButton are both times “super.init”, which should not result in an Exception either.
Maybe you have some odd mix with old jar/class files?