ChangeRes

Java code posted by Frostice
created at 25 Nov 11:46

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import java.awt.DisplayMode; 
import java.awt.GraphicsDevice; 
import java.awt.GraphicsEnvironment; 

public class FenBianLv { 
 public void setResolution() { 
  GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment(); 
  GraphicsDevice device=environment.getDefaultScreenDevice(); 
  DisplayMode displayMode=new DisplayMode(1024,768,16,75);/*分辨率1024*768 16位字 节 刷新频率75 */
  device.setDisplayMode(displayMode); 

 } 

 public static void main(String args[]) { 
  FenBianLv fbl = new FenBianLv(); 
  fbl.setResolution(); 
 } 

}
592 Bytes in 2 ms with coderay