javax.swing.JWindow.toFront()方法的使用及代码示例

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

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

JWindow.toFront介绍

暂无

代码示例

代码示例来源:origin: javax.help/javahelp

public void windowGainedFocus(WindowEvent e) {
  window.toFront();
}

代码示例来源:origin: PsiLupan/MakeLobbiesGreatAgain

public void run() {
    try {
      while (true) {
        frame.toFront(); //Fix for window sometime hiding behind others
        if (!frameMove) {
          Thread.sleep(400);
        } else {
          Thread.sleep(10);
        }
        Overlay.this.repaint();
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
};

代码示例来源:origin: google/sagetv

public void run()
 {
  Rectangle screenRect = getScreenArea0();
  poppy.setLocation(Math.min(screenRect.x + screenRect.width - poppy.getWidth(),
    Math.max(mouseX, screenRect.x)), Math.min(screenRect.y + screenRect.height - poppy.getHeight(),
      Math.max(mouseY, screenRect.y)));
  poppy.setVisible(true);
  poppy.toFront();
  poppy.repaint();
 }
});

代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik

public void actionPerformed(ActionEvent e) {
    if (window == null || !window.isVisible()) {
      if (window == null) {
        window = new JWindow(JSVGViewerFrame.this);
        Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
        window.setSize(size);
      }
      // Go to full screen in JWindow)
      svgCanvas.getParent().remove(svgCanvas);
      window.getContentPane().add(svgCanvas);
      window.setVisible(true);
      window.toFront();
      svgCanvas.requestFocus();
    } else {
      // Go back to JSVGViewerFrame display
      svgCanvas.getParent().remove(svgCanvas);
      svgCanvasPanel.add(svgCanvas, BorderLayout.CENTER);
      window.setVisible(false);
    }
  }
}

代码示例来源:origin: apache/batik

public void actionPerformed(ActionEvent e) {
    if (window == null || !window.isVisible()) {
      if (window == null) {
        window = new JWindow(JSVGViewerFrame.this);
        Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
        window.setSize(size);
      }
      // Go to full screen in JWindow)
      svgCanvas.getParent().remove(svgCanvas);
      window.getContentPane().add(svgCanvas);
      window.setVisible(true);
      window.toFront();
      svgCanvas.requestFocus();
    } else {
      // Go back to JSVGViewerFrame display
      svgCanvas.getParent().remove(svgCanvas);
      svgCanvasPanel.add(svgCanvas, BorderLayout.CENTER);
      window.setVisible(false);
    }
  }
}

代码示例来源:origin: igniterealtime/Spark

pt.translate(0, textField.getHeight());
popup.setLocation(pt);
popup.toFront();
popup.setVisible(true);

相关文章