本文整理了Java中javax.swing.JDesktopPane.setSize()
方法的一些代码示例,展示了JDesktopPane.setSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDesktopPane.setSize()
方法的具体详情如下:
包路径:javax.swing.JDesktopPane
类名称:JDesktopPane
方法名:setSize
暂无
代码示例来源:origin: Geomatys/geotoolkit
/**
* Creates a new viewer and show it immediately.
*/
Viewer(final String title) {
lock = new CountDownLatch(1);
frame = new JFrame(title);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.addWindowListener(this);
desktop = new JDesktopPane();
desktop.setSize(800, 600);
final JMenuBar menuBar = new JMenuBar();
if (true) {
final JMenu menu = new JMenu("File");
if (true) {
final JMenuItem item = new JMenuItem("Save as PNG");
item.addActionListener(new ActionListener() {
@Override public void actionPerformed(ActionEvent e) {
savePNG();
}
});
menu.add(item);
}
menuBar.add(menu);
}
frame.setJMenuBar(menuBar);
frame.add(desktop);
frame.pack();
frame.setVisible(true);
}
代码示例来源:origin: apache/sis
desktop.setSize(800, 600);
final JMenuBar menuBar = new JMenuBar();
代码示例来源:origin: com.eas.platypus/platypus-js-scalable-widget
JDesktopPane dp = new JDesktopPane();
dp.setLocation(20, 20);
dp.setSize(250, 450);
dp.setDesktopManager(new DefaultDesktopManager(){
@Override
内容来源于网络,如有侵权,请联系作者删除!