Title: RE: [JAVA3D] How to ensure that a Canvas3D is refreshed?

JDK 1.4 has a problem that behaves as you described (http://developer.java.sun.com/developer/bugParade/bugs/4374079.html).

Scott Rutledge found a workaround for this one:

----------

I've found a fix for this bug. Create your own canvas3d and implement the paint method thusly:

public void paint(Graphics g)
{
   super.paint(g);
   Toolkit.getDefaultToolkit().sync();
}

-----------

Some of our customers have had a similar bug with JDK 1.3. A workaround there has been to decrease the hardware acceleration level of the display driver.

Pasi

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Tomas Normark
Sent: 17. syyskuuta 2002 15:41
To: [EMAIL PROTECTED]
Subject: [JAVA3D] How to ensure that a Canvas3D is refreshed?


We are having some trouble in ensuring that a Canvas3D is refreshed.
We are developing a Swing GUI with toolbars at the top and to
the left and a Canvas3D in the center. We have several symptoms
for the same problem.

1) A context sensitive JPopupMenu on the Canvas3D leaves a
   gray rectangle on the canvas.

2) Tooltips leaves gray rectangles on the canvas.

3) When parts of the GUI is hidden behind the window of another
   application, that part of the canvas is gray when the GUI is
   brought to front again.

We are of course using:

JPopupMenu.setDefaultLightWeightPopupEnabled(false);
ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);

To try to make sure that the canvas is refreshed immediately we
have tried things such as:

canvas.repaint();                and / or
cansas.getView().repaint();

These seem to work some of the time but not always.

We also have two JScrollBars around the main canvas. When we click
on one of the knobs of the scrollers, the canvas is always refreshed
correctly even though the knob was not moved.

What command or sequence of commands should be given to ensure that
the canvas is always refreshed correctly? Is there some synchronize
or focus problems involved in this mixing of Swing and Canvas3D,
since it works sometimes and fails sometimes?

We are using JDK 1.3.1_04 and Java3D 1.2.1_03.


Tomas Normark

===========================================================================
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".

Reply via email to