Login  Register

Re: Design Time support for JOGL

Posted by pgespo62 on Dec 03, 2014; 5:06pm
URL: https://forum.jogamp.org/Design-Time-support-for-JOGL-tp4033698p4033703.html

I have this simple class that adds a GLJPanel to a JFrame:
import java.awt.EventQueue;

import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLJPanel;
import javax.swing.JFrame;

/**
 * This type...
 * TODO Type Description
 *
 * @author PierGiorgio
 *
 */
public class SampleJFrame extends JFrame {


    private GLJPanel gljpanel;

    /**
     * Launch the application.
     */
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    SampleJFrame frame = new SampleJFrame();
                    frame.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }

    /**
     * Create the frame.
     */
    public SampleJFrame() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(100, 100, 450, 300);
        GLProfile glprofile = GLProfile.getDefault();
        GLCapabilities glcapabilities = new GLCapabilities(glprofile);
        gljpanel = new GLJPanel( glcapabilities ); 
        setContentPane(gljpanel);
        
        
    }

}

Using the Design View of WindowBuilder with JOGL 2.1.5, I got such error:

While switching to JOGL 2.0.2 the form can be edited smoothly: