Hi mates, i have install the netbeans 6.7 and this plugin for the jogl http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3260! I try to compile the this program:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.media.opengl.*;
public class SimpleJoglApp extends JFrame{
public static void main(String[] args) {
final SimpleJoglApp app = new SimpleJoglApp();
// show what we've done
SwingUtilities.invokeLater (
new Runnable() {
public void run() {
app.setVisible(true);
}
}
);
}
public SimpleJoglApp() {
//set the JFrame title
super("Simple JOGL Application");
//kill the process when the JFrame is closed
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//only three JOGL lines of code ... and here they are
GLCapabilities glcaps = new GLCapabilities();
GLCanvas glcanvas = GLDrawableFactory.getFactory().createGLCanvas(glcaps);
glcanvas.addGLEventListener(new SimpleGLEventListener());
//add the GLCanvas just like we would any Component
getContentPane().add(glcanvas, BorderLayout.CENTER);
setSize(500, 300);
//center the JFrame on the screen
centerWindow(this);
}//end constructor SimpleJoglApp()
public void centerWindow(Component frame) {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.width > screenSize.width ) frameSize.width = screenSize.width;
if (frameSize.height > screenSize.height) frameSize.height = screenSize.height;
frame.setLocation (
(screenSize.width - frameSize.width ) >> 1,
(screenSize.height - frameSize.height) >> 1
);
}//end method centerWindow
}//end class SimpleJoglApp
and i take two errors, the first is createGLCanvas and the error it says “cannot find symbol” and the second error is SimpleGLEventListener and it says “cannot find the symbol”! The code i take from this sitehttp://www.genedavissoftware.com/books/jogl/ljogl_ch1.html Help me, please!
Thanks for your attention!