Skip to content

Instantly share code, notes, and snippets.

@Jimshii
Created June 29, 2012 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jimshii/3020107 to your computer and use it in GitHub Desktop.
Save Jimshii/3020107 to your computer and use it in GitHub Desktop.
JMain class
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