Here you can find the source of setPersistentExtendedStateMask(JFrame frame, int persistentExtendedStateMask)
Parameter | Description |
---|---|
frame | the frame, JFrame , who extended state mask is being set. |
persistentExtendedStateMask | mask which will be bitwise and'ed to this frame's extended state immediately before persisting it. |
public static void setPersistentExtendedStateMask(JFrame frame, int persistentExtendedStateMask)
//package com.java2s; /*// w w w .jav a2 s . c o m * Copyright (C) 2009 Illya Yalovyy * Use is subject to license terms. */ import javax.swing.JFrame; public class Main { private static final String FRAME_PERSISTENT_EXTENDED_STATE_MASK = "FrameState.persistentExtendedStateMask"; /** * Sets {@code JFrame} extended state mask on this frame. Used to block * certain extended state flags from being persisted. See {@code Frame} for * known extended state constants. <p>For example, if you want to close an * iconified application and have it open in the normal state, call * <code>setPersistentExtendedStateMask(frame, ~Frame.ICONIFIED)</code> * while initializing the application's frames. * * @param frame the frame, {@code JFrame}, who extended state mask is being * set. * @param persistentExtendedStateMask mask which will be bitwise and'ed to * this frame's extended state immediately before persisting it. */ public static void setPersistentExtendedStateMask(JFrame frame, int persistentExtendedStateMask) { frame.getRootPane().putClientProperty(FRAME_PERSISTENT_EXTENDED_STATE_MASK, persistentExtendedStateMask); } }