Class DummyFrameWithMenu

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class DummyFrameWithMenu extends KFrame
Dummy JFrame (KFrame) with menu. Seems due to some bug, AWT keeps always some reference to the last JFrame which has a menu used (or even the last two of those) - which will nearly always being some MasterBoard, thus preventing MasterBoard and with that very often also the Client (and many other related objects) from being properly garbage-collected. So, by opening one or two dummy frames, we get the MasterBoards free and AWT hold on those dummy frames - which are small and don't hurts us much. And if the SwingCleanup is done afterwards, we get even rid of the dummyFrames.
Author:
Clemens Katzer
See Also:
  • Field Details

    • id

      String id
    • closeBoardAction

      private AbstractAction closeBoardAction
    • disposed

      boolean disposed
  • Constructor Details

    • DummyFrameWithMenu

      public DummyFrameWithMenu(String nr)
  • Method Details

    • doOneDummyFrame

      public static void doOneDummyFrame(String id)
    • setupGUI

      private void setupGUI()
    • setupActions

      public void setupActions()
    • swingCleanup

      public static void swingCleanup()
    • dispose

      public void dispose()
      Overrides:
      dispose in class KFrame
    • main

      public static void main(String[] args)