List of usage examples for java.awt Frame setLayout
public void setLayout(LayoutManager mgr)
From source file:pl.edu.icm.visnow.lib.utils.ImageUtilities.java
public static Frame getNonClearingFrame(String name, Component c) { final Frame f = new Frame(name) { @Override//w w w . j av a 2s . c om public void update(Graphics g) { paint(g); } }; sizeContainerToComponent(f, c); centerFrame(f); f.setLayout(new BorderLayout()); f.add(c, BorderLayout.CENTER); f.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { f.dispose(); } }); return f; }