Java Swing Tutorial - Java GraphicsEnvironment .getMaximumWindowBounds ()








Syntax

GraphicsEnvironment.getMaximumWindowBounds() has the following syntax.

public Rectangle getMaximumWindowBounds()     throws HeadlessException

Example

In the following code shows how to use GraphicsEnvironment.getMaximumWindowBounds() method.

import java.awt.GraphicsEnvironment;
//from  w ww. j ava2 s .c o  m
public class Main {
  public static void main(String[] args) {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    System.out.println(ge.getMaximumWindowBounds());
    
    
  }
}

The code above generates the following result.