Guest User

Untitled

a guest
Jul 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. import java.awt.*;
  2. import javax.swing.JFrame;
  3. public class Engine extends JFrame {
  4.     public static void main(String[] args){
  5.        
  6.        
  7.         DisplayMode dm = new DisplayMode(800,600, 16, DisplayMode.REFRESH_RATE_UNKNOWN);
  8.         Engine e = new Engine();
  9.         e.run(dm);
  10.     }
  11.     public void run(DisplayMode dm){
  12.         setBackground(Color.PINK);
  13.         setForeground(Color.WHITE);
  14.         setFont(new Font("Arial", Font.PLAIN, 24));
  15.        
  16.         Screen s = new Screen();
  17.         try{
  18.             s.setFullscreen(dm, this);
  19.             try{
  20.                 Thread.sleep(5000);
  21.             }catch(Exception ex){}
  22.         }finally{
  23.                 s.restoreScreen();
  24.         }
  25.     }
  26. }
Add Comment
Please, Sign In to add comment