[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20050421: IDV - Custom GUI
- Subject: 20050421: IDV - Custom GUI
- Date: Fri, 22 Apr 2005 09:40:05 -0600
Hi Sean,
I have overwritten the doMakeDefaultContents() and essentially return a
JPanel that switches between a JTappedPane and a JSplitPane of two
MapViewManagers
The two MapViewManagers are added and removed from the JTabbedPane and
a JSplitPane.
I get the following error, which crashes the system and believe it is
due to the fact that I am adding and removing view managers to
JComponents and it doesn't appear that they like that.
When you say "crashes the system" do you mean the JVM crashes or you
just get the stack trace
you included in your message?
It looks like the MapViewManager still thinks it has a parent
JComponent and it is trying to draw itself then dies.
I tried the MultiPanelIdv, but it does't seem to be running any
differently than a regular Idv, could be old code not sure. None the
less I tried some of the ideas you had in there e.g. synchronizing the
areas of code where I remove/add the MapViewManagers from the
JTabbedPane and JSplitPane and did not help.
My sutff works fine as long as I never orphan or switch parents of the
MapViewManager. In other words, once I add it to a JComponent,
everything up the tree must stay intact or it crashes.
Is there special handling of view managers I need to do so this doesn't
happen.
I am trying to do something the IDV code was never designed to do? The
MultiPanelIdv was the only code I could look at. All other code
creates a new window with essentiall new MapViewManagers, which is
somewhat different. I am trying to do all operations with the same
window.
I don't think this is necessarily an IDV issue. Doing a google search:
http://www.google.com/search?hl=en&lr=&q=%22current+thread+not+owner%22++DrawingSurfaceObjectAWT&btnG=Search
I see somehow else had this problem on a Mac. Are you developing on the
Mac? Does this also show up on other platforms?
-Jeff