本文整理了Java中javax.swing.JFrame.isDisplayable()
方法的一些代码示例,展示了JFrame.isDisplayable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFrame.isDisplayable()
方法的具体详情如下:
包路径:javax.swing.JFrame
类名称:JFrame
方法名:isDisplayable
暂无
代码示例来源:origin: stackoverflow.com
JFrame fr = new JFrame();
fr.setResizable(false);
if (!fr.isDisplayable()) {
// Can only do this when the frame is not visible
fr.setUndecorated(true);
}
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
try {
if (gd.isFullScreenSupported()) {
gd.setFullScreenWindow(fr);
} else {
// Can't run fullscreen, need to bodge around it (setSize to screen size, etc)
}
fr.setVisible(true);
// Your business logic here
} finally {
gd.setFullScreenWindow(null);
}
代码示例来源:origin: stackoverflow.com
JFrame jFrame = new JFrame();
jFrame.setVisible(true);
jFrame.dispose();
System.out.println(jFrame.isDisplayable());
代码示例来源:origin: org.jdesktop.bsaf/bsaf
@Override
protected void end() {
JFrame mainFrame = getMainFrame();
if (mainFrame != null || mainFrame.isDisplayable()) {
mainFrame.setVisible(false);
mainFrame.dispose();
}
super.end();
}
}
代码示例来源:origin: org.apache.airavata/airavata-xbaya-gui
@Override
public void windowClosed(WindowEvent e) {
logger.debug(e.toString());
try {
XBayaGUI.this.engine.getMonitor().stop();
} catch (MonitorException e1) {
logger.error(e1.getMessage(), e1);
}
// Make sure to kill all threads.
// Dispose only when it can be disposed to prevent infinite loop
if (XBayaGUI.this.frame.isDisplayable()) {
XBayaGUI.this.frame.dispose();
}
}
});
内容来源于网络,如有侵权,请联系作者删除!