Example usage for java.awt Frame isResizable

List of usage examples for java.awt Frame isResizable

Introduction

In this page you can find the example usage for java.awt Frame isResizable.

Prototype

public boolean isResizable() 

Source Link

Document

Indicates whether this frame is resizable by the user.

Usage

From source file:Main.java

public static void main() {
    Frame frame = new Frame();
    frame.setResizable(false);/*from w  w  w . j a  va2s.c o m*/

    boolean resizable = frame.isResizable();
}

From source file:Main.java

public static boolean isResizable(final Frame frame) {
    if (frame != null) {
        if (SwingUtilities.isEventDispatchThread()) {
            return frame.isResizable();
        } else {//from  w w  w  . j a v a  2  s  . c o  m
            final boolean[] isResizable = new boolean[1];

            try {
                SwingUtilities.invokeAndWait(new Runnable() {
                    @Override
                    public void run() {
                        isResizable[0] = frame.isResizable();
                    }
                });
            } catch (InterruptedException | InvocationTargetException e) {

            }

            return isResizable[0];
        }
    } else {
        return false;
    }
}