I’m having problems with multiple instances of JGoOverview. I’m building an MDI app. that includes an Overview onto a JGOView.
Because of the problems with Swing (poor utility window/palette support), I’m including the overview within an internal frame. So that the internal frame includes both the JGOOverview and a small overview onto it. The internal frame works fine until a second instance of it is opened, from then on, both the original and second window instances fail to correctly provide an overview of their respective JGOViews. I had a quick look at the class defs and couldn’t see any obvious static fields, so I’m not sure how this has managed to get confused!
My first attempt was using some legacy code we had that used the JGO 4 example Overview class. I’ve also tested using the V5 JGoOverview that is now supplied as a component in the package.


I believe the problem is related to focus changes in the JDesktopPane. When focus changes between different JInternalFrames on the desktop it appears that the parent component of the JInternalFrame changes, so momentarily it has no parent. This causes JGoOverview.removeNotify() to be called which sets the observed JGoView to null:
* When the Overview window is no longer needed, make sure the
* observed view doesn’t keep any references to this view.
public void removeNotify()
myObserved = null;

You should subclass JGoOverview and override this method to do nothing. Then make sure these operations are performed when the JInternalFrame holdiong the JGoOverview is closed.


Thanks. That has fixed the problem.

I’m also allowing my users to specify some preferences - node height and width, and layout row/column spacing.
My nodes include horizontally oriented ListAreas so that I can display a set of icons.
When I do the resize the ListAreas seem to get confused. I need to do some more investigation, but if there’s anything obvious…