I had a similar problem rendering JPopup menus as a result of an event generated by a pickBehaviour. Heavyweight popups work fine but lightweight popups struggle to paint. The solution I used was to use the swing utility method SwingUtilities.invokeAndWait(runnableObject). This works fine for swing popups.
The API doc gives a clear example implemention. ----- Original Message ----- From: "Paul Brown" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 18, 2003 2:44 AM Subject: [JAVA3D] swing paint problems > Hi, > I have a J3D application which uses Swing components in a control panel. > The Swing components are on a number of JPanels; these are contained in > a JPanel with a CardLayout so enabling the user to switch between the > panels. The individual panels generally use GridBagLayouts and, > typically, contain only around half a dozen JTextField and JButtons. > > The first time I switch to one of the control panels, it seems to take > an awfully long time to paint the Swing components on the screen. If I > subsequently switch back to the same panel, the paint is instantaneous. > Likewise, if I do not add the Canvas3D, the Swing panels paint immediately. > > Therefore, I can only conclude that there is some conflict between > painting the Swing panels and Java 3D. > > I've read on the J3D.org FAQ that deadlocks can occur if the Swing > manipulation occurs on a non-event thread, but the switching between my > panels happens following button presses. > > I would welcome comments, observations and, in particular, suggestions > on improving the performance. > > Many thanks, > -Paul > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff JAVA3D-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".