Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.test.structure.wb;
- import java.awt.BorderLayout;
- import java.awt.Container;
- import javax.media.opengl.awt.GLCanvas;
- import javax.swing.JFrame;
- import javax.swing.JPanel;
- import javax.swing.JSplitPane;
- import javax.media.opengl.GLCapabilities;
- import javax.media.opengl.GLProfile;
- import com.jogamp.opengl.util.FPSAnimator;
- public class JoglTest extends JFrame {
- private static final long serialVersionUID = 1L;
- public static void main(String[] args) {
- new JoglTest();
- }
- public JoglTest() {
- Container contentPane = getContentPane();
- JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
- splitPane.setResizeWeight(0.5d);
- GLCanvas gc = new GLCanvas(new GLCapabilities(GLProfile.getDefault()));
- splitPane.setLeftComponent(gc);
- splitPane.setRightComponent(new JPanel());
- contentPane.add(splitPane, BorderLayout.CENTER);
- FPSAnimator animator = new FPSAnimator(gc, 100);
- animator.start();
- pack();
- setVisible(true);
- setSize(new java.awt.Dimension(824,568));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement