List of usage examples for java.awt Frame setSize
public void setSize(int width, int height)
The width and height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize .
From source file:Main.java
public static void main(String[] argv) throws Exception { Frame frame = new Frame(); frame.setSize(300, 300); frame.setVisible(true);// w w w. ja va 2 s .co m deiconify(frame); }
From source file:Main.java
public static void main(String[] argv) throws Exception { Frame frame = new Frame(); frame.setSize(300, 300); frame.setVisible(true);// w w w. java 2 s.com minimize(frame); }
From source file:Main.java
public static void main(String[] argv) throws Exception { Frame frame = new Frame(); frame.setSize(300, 300); frame.setVisible(true);//from w ww . j ava2 s . c om maximize(frame); }
From source file:HelloWorld.java
public static void main(String[] args) { Frame frame = new Frame(); frame.setSize(640, 480); frame.setLayout(new BorderLayout()); Canvas3D canvas = new Canvas3D(null); frame.add("Center", canvas); SimpleUniverse univ = new SimpleUniverse(canvas); univ.getViewingPlatform().setNominalViewingTransform(); BranchGroup scene = createSceneGraph(); scene.compile();//from w ww .jav a 2 s. c om univ.addBranchGraph(scene); frame.show(); }
From source file:ConvolveIt.java
public static void main(String args[]) { Frame f = new ConvolveIt(); f.setTitle("ConvolveIt"); f.setSize(300, 250); f.show();/* ww w .j a v a 2 s . c o m*/ }
From source file:GraphicsInfo.java
public static void main(String args[]) { Frame f = new GraphicsInfo(); f.setTitle("GraphicsInfo"); f.setSize(300, 250); f.show();/*from w w w .j a v a2s. co m*/ }
From source file:Main.java
public static void main(String[] args) throws HeadlessException, AWTException { Frame frame = new Frame(); Button button1 = new Button("Ok"); frame.add(button1, BorderLayout.NORTH); frame.setSize(50, 55); frame.setVisible(true);/*from ww w .j a v a2s . co m*/ button1.setCursor(Cursor.getSystemCustomCursor("MoveDrop.32x32")); }
From source file:Main.java
public static void main(String args[]) { Frame f = new Frame(); JPanel mgb = new Main(); f.add("Center", mgb); f.pack();// w w w . j a va 2 s . c om f.setSize(300, 300); f.setVisible(true); }
From source file:FrameIcon.java
/** Demo main program, showing two ways to use it. * Create a small MemImage and set it as this Frame's iconImage. * Also display a larger version of the same image in the Frame. *///from w w w .j a v a 2 s.c om public static void main(String[] av) { Frame f = new Frame("FrameIcon"); Image im = Toolkit.getDefaultToolkit().getImage("java2s.gif"); f.setIconImage(im); f.setSize(100, 100); f.setLocation(200, 200); f.setVisible(true); }
From source file:Drag.java
/** * Used when running as an application. *//*ww w. java 2s . com*/ public static void main(String[] args) { Drag drag = new Drag(); drag.setAppletFlag(false); drag.init(); Frame frame = new Frame("Drag the mouse in the window"); frame.setSize(640, 480); frame.add("Center", drag); frame.addWindowListener(new killAdapter()); frame.setVisible(true); }