Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import javax.swing.JFrame;
- public class Engine extends JFrame {
- public static void main(String[] args){
- DisplayMode dm = new DisplayMode(800,600, 16, DisplayMode.REFRESH_RATE_UNKNOWN);
- Engine e = new Engine();
- e.run(dm);
- }
- public void run(DisplayMode dm){
- setBackground(Color.PINK);
- setForeground(Color.WHITE);
- setFont(new Font("Arial", Font.PLAIN, 24));
- Screen s = new Screen();
- try{
- s.setFullscreen(dm, this);
- try{
- Thread.sleep(5000);
- }catch(Exception ex){}
- }finally{
- s.restoreScreen();
- }
- }
- }
Add Comment
Please, Sign In to add comment