Package

Source Code of Fullscreen

import gov.nasa.worldwind.BasicModel;
import gov.nasa.worldwind.awt.WorldWindowGLCanvas;

import java.awt.Frame;
import java.awt.event.KeyEvent;

public class Fullscreen {

  public static void main(String[] args) {
    Frame frame = new Frame("WorldwindFull");
    final WorldWindowGLCanvas worldWindowGLCanvas = new WorldWindowGLCanvas();
    worldWindowGLCanvas.setModel(new BasicModel());

    worldWindowGLCanvas.addKeyListener(new java.awt.event.KeyListener() {
      public void keyTyped(KeyEvent e) {
      }

      public void keyReleased(KeyEvent e) {
      }

      public void keyPressed(KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
          System.exit(0);
        }
      }
    });

    frame.add(worldWindowGLCanvas);
    frame.setSize(640, 480);
    frame.setUndecorated(true);
    int size = frame.getExtendedState();
    size |= Frame.MAXIMIZED_BOTH;
    frame.setExtendedState(size);

    frame.setVisible(true);
    worldWindowGLCanvas.requestFocus();
  }
}
TOP

Related Classes of Fullscreen

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.