0

I'm using the DockableFrame class (extends JComponent) from the Jide docking framework.

I want to add a listener to run some code when the docking frame is closed.

I tried to find information but every source I read tell me to use addWindowListener(), which I can't do because DockableFrame is not a JFrame and doesn't have the addWindowListener() method.

How can I add a listener that fires when the docking frame is closed?

Guillaume F.
  • 1,010
  • 7
  • 21

1 Answers1

0

Use addDockableFrameListener() with dockableFrameHidden() instead of addWindowListener():

addDockableFrameListener(
    new DockableFrameAdapter() {
      @Override
      public void dockableFrameHidden(DockableFrameEvent dockableFrameEvent) {
        ...
      }
    });
Guillaume F.
  • 1,010
  • 7
  • 21