Here you can find the source of getMaximumWindowWidth()
public static int getMaximumWindowWidth()
//package com.java2s; //License from project: LGPL import java.awt.Dimension; import java.awt.Toolkit; public class Main { public static int getMaximumWindowWidth() { Toolkit toolkit = Toolkit.getDefaultToolkit(); Dimension dim = toolkit.getScreenSize(); return dim.width; }/*from ww w . j a va 2s . c o m*/ }