DisplayMode: getHeight() : DisplayMode « java.awt « Java by API






DisplayMode: getHeight()

  


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

public class Main {
  public static void main(String[] argv) throws Exception {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice gs = ge.getDefaultScreenDevice();

    DisplayMode[] dmodes = gs.getDisplayModes();
    for (int i = 0; i < dmodes.length; i++) {
      int screenWidth = dmodes[i].getWidth();
      int screenHeight = dmodes[i].getHeight();

    }
  }
}

   
    
  








Related examples in the same category

1.DisplayMode.REFRESH_RATE_UNKNOWN
2.new DisplayMode(int width, int height, int bitDepth, int refreshRate)
3.DisplayMode: getBitDepth()
4.DisplayMode: getRefreshRate()
5.DisplayMode: getWidth()