|
Hi:
I just began learning Java
3D. In the Java 3D Tutorial book, it stated that:
"The typical Java 3D program begins by defining a new class to extend the Applet class. ... Java 3D programs could be written as applications, but using Applet class gives an easy way to produce a windowed application." (p1-13 from Java 3D Tutorial by Dennis J. Bouvier)I want to implement my 3D in MDI and so I modified the HelloJava3Dd from tutorial to MDI application. The codes is the same except following modification: (the "frame" here is JInternalFrame and it is passed as a parameter from main program): public HelloJava3Dd(JInternalFrame frame) {
frame.getContentPane().setLayout(new
BorderLayout()); } Actually the program run, as exepected. However, the program almost "monopoly" the whole CPU on my machine (433 MHZ on NT) both within the application and other applications. For example It takes several minutes to get response from clicking the menu or drag the window within the MDI. When it is running (cube rotating), other programs like Explorer almost irresponsive and take 10 mins to switch a directory. Can someone tell me what wrong with this implementation with JInternalFrame or other thread issue. Your help will be greatly appreciated. Sincerely, Taoan Ge The University of Iowa
|
