Here you can find the source of isNormalSizeMode(JFrame window)
public static boolean isNormalSizeMode(JFrame window)
//package com.java2s; //License from project: Open Source License import java.awt.Frame; import javax.swing.JFrame; public class Main { /** Check window for normal state. Checks if window is not maximized (in either or both directions) and not iconified. *//*from w w w .j av a 2s. c o m*/ public static boolean isNormalSizeMode(JFrame window) { int state = window.getExtendedState(); int mask = Frame.MAXIMIZED_BOTH | Frame.MAXIMIZED_VERT | Frame.MAXIMIZED_HORIZ | Frame.ICONIFIED; return ((state & mask) == 0); } }