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

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

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

JWindow.setAlwaysOnTop介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

frame.setAlwaysOnTop(true);
frame.addMouseListener(new MouseAdapter() {
  @Override

代码示例来源:origin: stackoverflow.com

ImageIcon icon = new ImageIcon("images/ajax-loader.gif");
 JLabel label=new JLabel(icon);
 JWindow myJFrame=new JWindow();
 myJFrame.setLayout(new BorderLayout());
 myJFrame.add(label,BorderLayout.CENTER);
 myJFrame.setLocationRelativeTo(null);
 myJFrame.setOpacity(0.5f);
 myJFrame.setAlwaysOnTop(true);
 label.setOpaque(false);
 AWTUtilities.setWindowOpaque(myJFrame, false);
 myJFrame.pack();
 myJFrame.setVisible(true);

代码示例来源:origin: stackoverflow.com

private Window initFullScreenWindow() {
  GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
  GraphicsDevice[] gds = ge.getScreenDevices();
  GraphicsDevice gd = gds[1];
  JWindow window = new JWindow(gd.getDefaultConfiguration());
  window.setContentPane(getJFSPanel());
  window.setLocation(1280, 0);
  window.setSize(gd.getDisplayMode().getWidth(), gd.getDisplayMode().getHeight());
  window.setAlwaysOnTop(true);
  //gd.setFullScreenWindow(window);
  return window;
}

代码示例来源:origin: stackoverflow.com

final JWindow initWindow = new JWindow();
SwingWorker<Object, Object> task = new SwingWorker<Object, Object>()
      {
    public Object doInBackground() 
    {
      //show init window
      //....
      initWindow.getContentPane().add(text);

      ( (JComponent) initWindow.getContentPane ( ) ).setBorder(new CompoundBorder(new CustomRoundedBorder(), new LineBorder(new Color(...)));

      AWTUtilities.setWindowOpaque ( initWindow, false );

      initWindow.setAlwaysOnTop(true);

      initWindow.setVisible(true);
       //....
      return null;
    }
    public void done() 
    {
    }
  };
  task.execute();

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

popup.setAlwaysOnTop(true);

代码示例来源:origin: stackoverflow.com

frame.setAlwaysOnTop(true);
frame.setLayout(new BorderLayout());
frame.add(new SplashPane());

代码示例来源:origin: stackoverflow.com

frame.setLocationRelativeTo(null);
frame.setVisible(true);
frame.setAlwaysOnTop(true);

代码示例来源:origin: stackoverflow.com

JWindow subFrame = new JWindow();           
subFrame.setBounds(0, 0, 500, 500);
subFrame.setAlwaysOnTop(true);
subFrame.setOpacity(0.50f);
subFrame.setBackground(new Color(1.0f, 1.0f, 1.0f, 0.05f));

JButton button = new JButton("Hello");
button.setBounds(20, 180, 100, 40);

subFrame.getContentPane().setLayout(null);
subFrame.getContentPane().add(button);
subFrame.setVisible(true);

代码示例来源:origin: chatty/chatty

window.setFocusableWindowState(false);
window.setAutoRequestFocus(false);
window.setAlwaysOnTop(true);
window.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
checkTranslucencySupport();

代码示例来源:origin: net.lecousin/core

synchronized (this) {
  win = new JWindow();
  win.setAlwaysOnTop(true);
  win.getRootPane().setBorder(new LineBorder(Color.BLACK));
  win.getRootPane().getContentPane().setLayout(new BoxLayout(win.getRootPane().getContentPane(), BoxLayout.Y_AXIS));

代码示例来源:origin: org.cytoscape/splash

public void showSplash() {
  hideSplash();
  
  JComponent content = new JLabel(image);
  window = new JWindow();
  window.getContentPane().add(content);
  window.pack();
  centerWindowLocation(window);
  window.setVisible(true);
  window.setAlwaysOnTop(true);
  content.addMouseListener(new MouseListener() {
      public void mouseClicked(MouseEvent e) {
        hideSplash();
      }
      public void mouseEntered(MouseEvent e) { }
      public void mouseExited(MouseEvent e) { }
      public void mousePressed(MouseEvent e) { }
      public void mouseReleased(MouseEvent e) { }
    });
}

代码示例来源:origin: com.github.lgooddatepicker/LGoodDatePicker

displayWindow.setAlwaysOnTop(true);

代码示例来源:origin: stackoverflow.com

jWindow.setAlwaysOnTop(true);
jWindow.getContentPane().setLayout(new FlowLayout());
jWindow.getContentPane().add(this);

代码示例来源:origin: cytoscape/application

centerWindowLocation(splashWindow);
splashWindow.setVisible(true);
splashWindow.setAlwaysOnTop(true);

代码示例来源:origin: stackoverflow.com

window.setSize(windowSize, windowSize);
window.setVisible(true);
window.setAlwaysOnTop(true);
JPanel panel = singleColorPanel(Color.red);
window.setContentPane(panel);

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

frame.setAlwaysOnTop(true);
frame.addMouseListener(new MouseListener() {
  @Override

代码示例来源:origin: org.cytoscape/splash

window.requestFocusInWindow();
centerWindowLocation(window);
window.setAlwaysOnTop(true);
window.setVisible(true);

代码示例来源:origin: cytoscape/application

window.requestFocusInWindow();
WindowUtilities.centerWindowLocation(window);
window.setAlwaysOnTop(true);
window.setVisible(true);

代码示例来源:origin: raydac/netbeans-mmd-plugin

this.tabPane.setComponentAt(tabIndex, label);
final JWindow window = new JWindow(Main.getApplicationFrame());
window.setAlwaysOnTop(true);
window.setAutoRequestFocus(true);
window.setContentPane(selectedEditor.getContainerToShow());

相关文章