How it is correct to create Tab programmatically?
I have CControl and CGrid where are added 3 tabs.
I create new tab (new DefaultSingleCDockable), add (addDockable) it in CControl, then do setLocation and setVisible (true).
But sametime after DnD this new tab appear error:
Exception in thread “AWT-EventQueue-1” java.lang.StackOverflowError
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:892)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:128)
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:892)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:128)
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:892)
This is a strange exception, I’m not certain if your construction of the tabs and the exception have any relation. It could be coincidence.
I can’t do anything without stacktrace: next time the exception happens please post the part of the exception which does not repeat itself (should be at the bottom of the print out), because the bug is more likely to be found in that part.
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:892)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:128)```
line at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:128) repeats many-many times (~500-1000).
2) Sametime there is:
Exception in thread “AWT-EventQueue-0” java.lang.StackOverflowError
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
…
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
Exception in thread “AWT-EventQueue-1” java.lang.IllegalArgumentException: dockable not known to this station
at bibliothek.gui.dock.SplitDockStation.getDockablePlaceholderProperty(SplitDockStation.java:1373)
at bibliothek.gui.dock.SplitDockStation.getDockableProperty(SplitDockStation.java:1283)
at bibliothek.gui.dock.util.DockUtilities.getPropertyChain(DockUtilities.java:342)
at bibliothek.gui.dock.common.mode.station.CSplitDockStationHandle$Normal.getLocation(CSplitDockStationHandle.java:240)
at bibliothek.gui.dock.facile.mode.DefaultLocationMode.current(DefaultLocationMode.java:51)
at bibliothek.gui.dock.facile.mode.DefaultLocationMode.current(DefaultLocationMode.java:42)
at bibliothek.gui.dock.support.mode.ModeManager.store(ModeManager.java:1044)
at bibliothek.gui.dock.support.mode.ModeManager$5.handleDockable(ModeManager.java:1027)
at bibliothek.gui.dock.util.DockUtilities.visitDockable(DockUtilities.java:139)
at bibliothek.gui.dock.util.DockUtilities.visit(DockUtilities.java:100)
at bibliothek.gui.dock.support.mode.ModeManager.store(ModeManager.java:1022)
at bibliothek.gui.dock.facile.mode.LocationModeManager$RelocatorListener.dragging(LocationModeManager.java:658)
at bibliothek.gui.dock.control.relocator.AbstractDockRelocator.fireDragging(AbstractDockRelocator.java:165)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator$2.dragging(DefaultDockRelocator.java:213)
at bibliothek.gui.dock.control.relocator.DropOperation.execute(DropOperation.java:80)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.executeOperation(DefaultDockRelocator.java:191)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.dragMouseReleased(DefaultDockRelocator.java:826)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.dragMouseReleased(DefaultDockRelocator.java:736)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator$MouseRepresentativeListener.mouseReleased(DefaultDockRelocator.java:1085)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:371)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:279)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.mouseReleased(GlassedPane.java:242)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
3) sametime this:
Exception in thread “AWT-EventQueue-0” java.lang.StackOverflowError
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
…
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:727)
at java.awt.Component.removeFocusListener(Component.java:5095)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:118)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.DefaultFocusStrategy.add(DefaultFocusStrategy.java:138)
at bibliothek.gui.dock.control.focus.DefaultFocusStrategy.access$000(DefaultFocusStrategy.java:47)
at bibliothek.gui.dock.control.focus.DefaultFocusStrategy$1.dockableRegistered(DefaultFocusStrategy.java:57)
at bibliothek.gui.dock.control.DockRegister.fireDockableRegistered(DockRegister.java:431)
at bibliothek.gui.dock.control.DockRegister.register(DockRegister.java:349)
at bibliothek.gui.dock.control.DockRegister$1.handleDockable(DockRegister.java:183)
at bibliothek.gui.dock.util.DockUtilities.visitDockable(DockUtilities.java:139)
at bibliothek.gui.dock.util.DockUtilities.visit(DockUtilities.java:111)
at bibliothek.gui.dock.control.DockRegister.add(DockRegister.java:180)
at bibliothek.gui.dock.control.DockRegister.access$400(DockRegister.java:46)
at bibliothek.gui.dock.control.DockRegister$StationListener.addDockable(DockRegister.java:616)
at bibliothek.gui.dock.control.DockRegister$StationListener.fire(DockRegister.java:542)
at bibliothek.gui.dock.control.DockRegister.setStalled(DockRegister.java:504)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.executeOperation(DefaultDockRelocator.java:239)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.dragMouseReleased(DefaultDockRelocator.java:826)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.dragMouseReleased(DefaultDockRelocator.java:736)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator$MouseRepresentativeListener.mouseReleased(DefaultDockRelocator.java:1085)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:284)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:283)
at java.awt.Component.processMouseEvent(Component.java:6301)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3278)
at java.awt.Component.processEvent(Component.java:6066)
at java.awt.Container.processEvent(Container.java:2052)
at java.awt.Component.dispatchEventImpl(Component.java:4664)
at java.awt.Container.dispatchEventImpl(Container.java:2110)
at java.awt.Component.dispatchEvent(Component.java:4494)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:371)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:279)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.mouseReleased(GlassedPane.java:242)
at java.awt.Component.processMouseEvent(Component.java:6301)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3278)
at java.awt.Component.processEvent(Component.java:6066)
at java.awt.Container.processEvent(Container.java:2052)
at java.awt.Component.dispatchEventImpl(Component.java:4664)
at java.awt.Container.dispatchEventImpl(Container.java:2110)
at java.awt.Component.dispatchEvent(Component.java:4494)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:371)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:279)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.mouseReleased(GlassedPane.java:242)
at java.awt.Component.processMouseEvent(Component.java:6301)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3278)
at java.awt.Component.processEvent(Component.java:6066)
at java.awt.Container.processEvent(Container.java:2052)
at java.awt.Component.dispatchEventImpl(Component.java:4664)
at java.awt.Container.dispatchEventImpl(Container.java:2110)
at java.awt.Component.dispatchEvent(Component.java:4494)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4588)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4249)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4179)
at java.awt.Container.dispatchEventImpl(Container.java:2096)
at java.awt.Component.dispatchEvent(Component.java:4494)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:652)
at java.awt.EventQueue.access$000(EventQueue.java:95)
at java.awt.EventQueue$1.run(EventQueue.java:613)
at java.awt.EventQueue$1.run(EventQueue.java:611)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:34)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:34)
at java.awt.EventQueue$2.run(EventQueue.java:626)
at java.awt.EventQueue$2.run(EventQueue.java:624)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:29)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:623)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:280)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:180)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:172)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:133)
moreover, sametime, when close application and exec code
```public void destroyOnClose(final CControl control) {
runOnClose(new Runnable() {
public void run() {
control.destroy();
}
});
}```
happens ecxeption 1) (look above)
I could not reproduce the error. But it seems to be the same issue all the times (everything that follows the first exception is likely caused by corrupted data structures). The only idea I have right now would be an issue with multi threading. Are you using multi threading when creating the layout, for example do you make the frame visible in the “main” method and load the layout afterwards in the “main” method?
java.lang.IllegalStateException: The parent of 'bibliothek.gui.dock.common.intern.DefaultCommonDockable@e530e53' is not null but 'Root [id=1344236649075]
Node[ HORIZONTAL , id=1344236649090, placeholders={}]
Node[ HORIZONTAL , id=1344236677062, placeholders={}]
Leaf[ ?????????, placeholders={}, id=1344236649092 ]
Leaf[ ?? ??????? ???? ?????????, ???, placeholders={dock.single.??\ ???????\ ????\ ????????????}, id=1344236659850 ]
Placeholder: dock.single.currency'
at bibliothek.gui.dock.DockHierarchyLock.ensureUnlinked(DockHierarchyLock.java:359)
at bibliothek.gui.dock.DockHierarchyLock.access$500(DockHierarchyLock.java:45)
at bibliothek.gui.dock.DockHierarchyLock$Token.release(DockHierarchyLock.java:420)
at bibliothek.gui.dock.SplitDockStation.dropOver(SplitDockStation.java:2019)
at bibliothek.gui.dock.SplitDockStation.dropOver(SplitDockStation.java:1977)
at bibliothek.gui.dock.SplitDockStation$SplitDropOperation.drop(SplitDockStation.java:3143)
at bibliothek.gui.dock.SplitDockStation$SplitDropOperation.move(SplitDockStation.java:3085)
at bibliothek.gui.dock.SplitDockStation$SplitDropOperation.execute(SplitDockStation.java:3037)
at bibliothek.gui.dock.control.relocator.DropOperation.execute(DropOperation.java:84)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.executeOperation(DefaultDockRelocator.java:191)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.dragMouseReleased(DefaultDockRelocator.java:826)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.dragMouseReleased(DefaultDockRelocator.java:736)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator$MouseRepresentativeListener.mouseReleased(DefaultDockRelocator.java:1085)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:284)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:283)
at java.awt.Component.processMouseEvent(Component.java:6301)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3278)
at java.awt.Component.processEvent(Component.java:6066)
at java.awt.Container.processEvent(Container.java:2052)
at java.awt.Component.dispatchEventImpl(Component.java:4664)
at java.awt.Container.dispatchEventImpl(Container.java:2110)
at java.awt.Component.dispatchEvent(Component.java:4494)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:371)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:279)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.mouseReleased(GlassedPane.java:242)
at java.awt.Component.processMouseEvent(Component.java:6301)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3278)
at java.awt.Component.processEvent(Component.java:6066)
at java.awt.Container.processEvent(Container.java:2052)
at java.awt.Component.dispatchEventImpl(Component.java:4664)
at java.awt.Container.dispatchEventImpl(Container.java:2110)
at java.awt.Component.dispatchEvent(Component.java:4494)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4588)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4249)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4179)
at java.awt.Container.dispatchEventImpl(Container.java:2096)
at java.awt.Component.dispatchEvent(Component.java:4494)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:652)
at java.awt.EventQueue.access$000(EventQueue.java:95)
at java.awt.EventQueue$1.run(EventQueue.java:613)
at java.awt.EventQueue$1.run(EventQueue.java:611)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:34)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:34)
at java.awt.EventQueue$2.run(EventQueue.java:626)
at java.awt.EventQueue$2.run(EventQueue.java:624)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:29)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:623)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:280)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:180)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:172)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:133)
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
...many-many time repeat this line
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:139)
at java.awt.AWTEventMulticaster.removeInternal(AWTEventMulticaster.java:903)
at java.awt.AWTEventMulticaster.remove(AWTEventMulticaster.java:727)
at java.awt.Component.removeFocusListener(Component.java:5095)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:118)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker.remove(FocusTracker.java:123)
at bibliothek.gui.dock.control.focus.FocusTracker$2.componentRemoved(FocusTracker.java:60)
at java.awt.AWTEventMulticaster.componentRemoved(AWTEventMulticaster.java:204)
at java.awt.Container.processContainerEvent(Container.java:2081)
at java.awt.Container.processEvent(Container.java:2049)
at java.awt.Component.dispatchEventImpl(Component.java:4664)
at java.awt.Container.dispatchEventImpl(Container.java:2110)
at java.awt.Component.dispatchEvent(Component.java:4494)
at java.awt.Container.remove(Container.java:1173)
at java.awt.Container.remove(Container.java:1209)
at javax.swing.JViewport.remove(JViewport.java:348)
at javax.swing.JViewport.setView(JViewport.java:988)
at javax.swing.JScrollPane.setColumnHeaderView(JScrollPane.java:1133)
at javax.swing.JTable.unconfigureEnclosingScrollPane(JTable.java:825)
at javax.swing.JTable.removeNotify(JTable.java:796)
at java.awt.Container.removeNotify(Container.java:2620)
at javax.swing.JComponent.removeNotify(JComponent.java:4712)
at java.awt.Container.removeNotify(Container.java:2620)
at javax.swing.JComponent.removeNotify(JComponent.java:4712)
at java.awt.Container.removeNotify(Container.java:2620)
at javax.swing.JComponent.removeNotify(JComponent.java:4712)
at java.awt.Container.removeNotify(Container.java:2620)
at javax.swing.JComponent.removeNotify(JComponent.java:4712)
at java.awt.Container.removeNotify(Container.java:2620)
at javax.swing.JComponent.removeNotify(JComponent.java:4712)
at java.awt.Container.removeNotify(Container.java:2620)
at javax.swing.JComponent.removeNotify(JComponent.java:4712)
at java.awt.Container.removeNotify(Container.java:2620)
at javax.swing.JComponent.removeNotify(JComponent.java:4712)
at java.awt.Container.removeNotify(Container.java:2620)
at javax.swing.JComponent.removeNotify(JComponent.java:4712)
at java.awt.Container.removeNotify(Container.java:2620)
at javax.swing.JComponent.removeNotify(JComponent.java:4712)
at java.awt.Container.remove(Container.java:1151)
at java.awt.Container.remove(Container.java:1209)
at bibliothek.gui.dock.SplitDockStation.removeDisplayer(SplitDockStation.java:2727)
at bibliothek.gui.dock.SplitDockStation.removeHandle(SplitDockStation.java:2692)
at bibliothek.gui.dock.SplitDockStation.access$2100(SplitDockStation.java:179)
at bibliothek.gui.dock.SplitDockStation$Access.removeHandle(SplitDockStation.java:3202)
at bibliothek.gui.dock.station.split.Leaf.setDockable(Leaf.java:177)
at bibliothek.gui.dock.station.split.Leaf.setDockable(Leaf.java:148)
at bibliothek.gui.dock.SplitDockStation.dropOver(SplitDockStation.java:2015)
at bibliothek.gui.dock.SplitDockStation.dropOver(SplitDockStation.java:1977)
at bibliothek.gui.dock.SplitDockStation$SplitDropOperation.drop(SplitDockStation.java:3143)
at bibliothek.gui.dock.SplitDockStation$SplitDropOperation.move(SplitDockStation.java:3085)
at bibliothek.gui.dock.SplitDockStation$SplitDropOperation.execute(SplitDockStation.java:3037)
at bibliothek.gui.dock.control.relocator.DropOperation.execute(DropOperation.java:84)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.executeOperation(DefaultDockRelocator.java:191)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.dragMouseReleased(DefaultDockRelocator.java:826)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator.dragMouseReleased(DefaultDockRelocator.java:736)
at bibliothek.gui.dock.control.relocator.DefaultDockRelocator$MouseRepresentativeListener.mouseReleased(DefaultDockRelocator.java:1085)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:284)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:283)
at java.awt.Component.processMouseEvent(Component.java:6301)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3278)
at java.awt.Component.processEvent(Component.java:6066)
at java.awt.Container.processEvent(Container.java:2052)
at java.awt.Component.dispatchEventImpl(Component.java:4664)
at java.awt.Container.dispatchEventImpl(Container.java:2110)
at java.awt.Component.dispatchEvent(Component.java:4494)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:371)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.send(GlassedPane.java:279)
at bibliothek.gui.dock.security.GlassedPane$GlassPane.mouseReleased(GlassedPane.java:242)
at java.awt.Component.processMouseEvent(Component.java:6301)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3278)
at java.awt.Component.processEvent(Component.java:6066)
at java.awt.Container.processEvent(Container.java:2052)
at java.awt.Component.dispatchEventImpl(Component.java:4664)
at java.awt.Container.dispatchEventImpl(Container.java:2110)
at java.awt.Component.dispatchEvent(Component.java:4494)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4588)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4249)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4179)
at java.awt.Container.dispatchEventImpl(Container.java:2096)
at java.awt.Component.dispatchEvent(Component.java:4494)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:652)
at java.awt.EventQueue.access$000(EventQueue.java:95)
at java.awt.EventQueue$1.run(EventQueue.java:613)
at java.awt.EventQueue$1.run(EventQueue.java:611)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:34)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:34)
at java.awt.EventQueue$2.run(EventQueue.java:626)
at java.awt.EventQueue$2.run(EventQueue.java:624)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:29)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:623)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:280)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:180)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:172)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:133)
You think there is any chance you can give me your applet, at least the part that sets up and interacts with the framework? Because I’m a bit out of ideas on how this can happen, looking into the application may help.
For now I always got the same exception(s). I added a breakpoint that stops the entire VM when the exception is thrown. The stacktraces always look the same: this exception is caused by multi-threading. Have a look at these images: image 1 and image 2. As you can see, the MySwingWorker is removing a HierarchyListener, while at the same time the EventDispatcherThread tries to fire a HiearchyEvent.
This could be solved by calling any method of “StatusPanel” from the EDT (using EventQueue.invokeLater/invokeAndWait).
I not absolutely understood where you suggest to use EventQueue.invokeLater/invokeAndWait?
I should use SwingWorker, otherwise the interface will be frozen when loading large data.
You can use the SwingWorker, but you must not access the UI from within the SwingWorker. As an example have a look at your class “LoadItemsTest” and its method “run”. This “run” method is called from a custom thread (created by the SwingWorker), but then within “run” you have calls like “panelStatus.setPBIndenterminate(true);”. But “panelStatus” is part of the UI, hence you access the UI from a second thread.
At least the SwingWorker class from the JRE 6 has special methods like “publish” and “process” which are designed to solve exactly this issue. In your case you would access “panelStatus” only from the “process” method. Using “EventQueue.invokeLater” from within the “run” method of “LoadItemsTest” would have the same effect.
Throughout a subject…
I am a programmer of Lotus Notes. In Notes of documents it is possible to embed java applets. For this reason my project is JApplet. And so, at start of embedded java applet internal JVM starts. Further there is a work in an applet. Here all while is good. But after end of an applet end close it, the JVM remains started (it is feature of work of Lotus Notes). And here problems begin - memory taken with an applet isn’t released almost.
Possibly it again my Java illiteracy, but can be memory leak because of dockingframes?
I cause cControl.destroy () in stop () an applet, but sometimes code process doesn’t occur further. And I can’t catch a mistake, though I use “try catch”.
I seem understood.
It is feature of Lotus Notes. The code in JApplet.stop() needs to be turned in EventQueue.invokeAndWait. Then it is completely carried out, differently can break on a half.