Pages

Source code to determine display mode for current screen can change or not using java


***********************************************************
COMPLETE SOURCE CODE FOR : DetermineDisplayModeCanChangeOrNot.java
***********************************************************


import java.awt.GraphicsEnvironment;
import java.awt.GraphicsDevice;

public class DetermineDisplayModeCanChangeOrNot
{
public static void main(String[]args)
{
GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd=ge.getDefaultScreenDevice();

//METHOD isDisplayChangeSupported() returns true if this GraphicsDevice supports low-level display changes.
boolean change=gd.isDisplayChangeSupported();

if(change==true)
{
System.out.println("DISPLAY MODE CAN CHANGE");
}

else
{
System.out.println("DISPLAY MODE CANNOT CHANGE");
}
}
}


***********************************************************
JUST COMPILE AND EXECUTE IT
***********************************************************
Related Posts Plugin for WordPress, Blogger...