Java 3d display window "flashing"
<p>i have recently began my quest into the realm of 3d graphics for java and after many hours of searching through 3d APIs i came to what i have decided is the right API for me, Java 3d. After reading the first tutorial i figured i would copy the code and give it a go,</p>

<pre><code>import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.ColorCube;
import javax.media.j3d.BranchGroup;

public class Hello3d 
{
    public Hello3d()
    {
       SimpleUniverse universe = new SimpleUniverse();
       BranchGroup group = new BranchGroup();
       group.addChild(new ColorCube(0.3));
       universe.getViewingPlatform().setNominalViewingTransform();
       universe.addBranchGraph(group);
    }

    public static void main(String[] args ) {
       new Hello3d();  
    }
}
</code></pre>

<p>The program is quite simple, it is just supposed to output a red cube facing the camera giving it the appearance of a red square.  </p>

<p>I put this into the following file structure:</p>

<pre><code>java3d/
├── ext/
│   ├── jd3core.jar
│   ├── jd3utils.jar
│   └── vecmath.jar
│ 
└── Hello3d.java
</code></pre>

<p>then i compiled on command line like so</p>

<pre><code>javac -cp "ext/*"; Hello3d.java
</code></pre>

<p>and ran it quite the same way</p>

<pre><code>java -cp "ext/*"; Hello3d
</code></pre>

<p>This is where i run into the problem. The display screen is occasionally the expected output and occasionally just completely blank.
<a href="https://i.stack.imgur.com/tSUA3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tSUA3.png" alt="screen caps of the window in both states"></a>  </p>

<p>When resizing the window the display screen will vigorously flash between the correct output and the blank screen. Is there any way to fix the fact that half the time my display window will strait up not work?  </p>

<p>Other information that might help:</p>

<p>I am running Windows 10<br>
Using Java 3d 1.5.1 (Atemped to use 1.5.2 and experimental 1.6.0, same problem)<br>
I am using Java 7</p>

<p>I think <a href="https://stackoverflow.com/questions/13630978/blinking-when-swapping-jpanel-content">This question</a> might have something to do with my problem, but dont really understand what it is i can do to fix it.</p>