Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
import java.awt.BorderLayout;
import java.awt.GraphicsConfiguration;
import javax.media.j3d.*;
import javax.swing.*;
import javax.vecmath.Point3d;
 import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.universe.SimpleUniverse;
 
//JFrame class inherits the code from the Swing JPanel class.
public class SampleCubeRotate3D extends JPanel {
 
    //The constructor method
    public SampleCubeRotate3D() {
 
        //Set the layout, this is just a standard thing.
        setLayout(new BorderLayout());
more codes but i just end here

public static void main(String[] args) {
       //Set the No Erase Background property to true
       System.setProperty("sun.awt.noerasebackground", "true");

       //Disable the JPopupMenu
       JPopupMenu.setDefaultLightWeightPopupEnabled(false);

       //Create an instance for the ToolTipManager
       ToolTipManager ttm = ToolTipManager.sharedInstance();

       //Disable the ToolTipManager
       ttm.setLightWeightPopupEnabled(false);

       //Create object instance
       SampleCubeRotate3D main = new SampleCubeRotate3D();

       //Create new JFrame instance
       JFrame frame = new JFrame("Just Java 3D - Spinning Cube!");

       //Set the size of the JFrame
       frame.setSize(750, 500);

       //The frame will now hold the main canvas
       frame.getContentPane().add(main);

       //Make sure the frame is actually visible
       frame.setVisible(true);
   }
after i run the error is in static void main

What I have tried:

tried checking the import and the properties
Posted
Comments
Richard MacCutchan 3-Jun-22 4:33am    
Which is line 69 of SampleCubeRotate3D.java. and what other error messages are there?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900