Created
June 29, 2012 19:27
-
-
Save Jimshii/3020107 to your computer and use it in GitHub Desktop.
JMain class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package package_full; | |
import java.awt.*; | |
import javax.swing.JFrame; | |
public class JMain extends JFrame { | |
public static void main(String[] args) { | |
DisplayMode dm = new DisplayMode(800, 600, 16, DisplayMode.REFRESH_RATE_UNKNOWN); | |
JMain m = new JMain(); | |
m.run(dm); | |
} | |
public void run(DisplayMode dm) { | |
setBackground(Color.RED); | |
setForeground(Color.BLACK); | |
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(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment