Pages

Current bit depth


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


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

import java.awt.DisplayMode;

public class CurrentBitDepth
{
public static void main(String[]args)
{
//HOW TO GET CURRENT SCREEN BIT DEPTH

GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd=ge.getDefaultScreenDevice();
DisplayMode dm=gd.getDisplayMode();

//Print current bit depth
System.out.println("CURRENT SCREEN BIT DEPTH IS: "+dm.getBitDepth());
}
}


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