javax.swing.JFrame.isDisplayable()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(244)

本文整理了Java中javax.swing.JFrame.isDisplayable()方法的一些代码示例,展示了JFrame.isDisplayable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFrame.isDisplayable()方法的具体详情如下:
包路径:javax.swing.JFrame
类名称:JFrame
方法名:isDisplayable

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();
    }
  }
});

相关文章

JFrame类方法