JOGL Frame using AWT - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
JOGL Frame using AWT

JOGL Frame using AWT

AWT (Abstract Window Toolkit) is an application programming interface used to develop window-based applications. The components provided by AWT are heavy weight and platform dependent. The java.awt package contains various AWT classes for API's.

JOGL Frame Example

package info.learnhowtocode.jogl;  
importjava.awt.Frame;  
importjavax.media.opengl.*;  
importjavax.media.opengl.awt.GLCanvas;  
  
public class AWTFrame implements GLEventListener {  
  
   @Override  
    public void init(GLAutoDrawableobj) {  
      
       }  
      
   @Override  
public void display(GLAutoDrawableobj) {  
  
   }  
  
   @Override  
public void reshape(GLAutoDrawable obj1, int obj2, int obj3, int obj4, int obj5) {  
  
   }  
      
   @Override  
public void dispose(GLAutoDrawableobj) {  
  
   }  
  
public static void main(String[] args) {  
  
  
finalGLProfilegp = GLProfile.get(GLProfile.GL4);  
GLCapabilities cap = new GLCapabilities(gp);  
  
  
finalGLCanvasgc = new GLCanvas(cap);  
AWTFrameaf = new AWTFrame();  
gc.addGLEventListener(af);          
gc.setSize(350, 350);  
  
      //Now creating a frame using Frame class of AWT  
final Frame frame = new Frame ("AWT Frame");  
  
frame.add(gc);  
frame.setSize( 500, 400 );  
frame.setVisible(true);  
   }  
      
}  

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.