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

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

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

JFrame.setAlwaysOnTop介绍

暂无

代码示例

代码示例来源:origin: RipMeApp/ripme

@Override
  public void mouseClicked(MouseEvent e) {
    toggleTrayClick();
    if (mainFrame.getExtendedState() != JFrame.NORMAL) {
      mainFrame.setExtendedState(JFrame.NORMAL);
    }
    mainFrame.setAlwaysOnTop(true);
    mainFrame.setAlwaysOnTop(false);
  }
});

代码示例来源:origin: RipMeApp/ripme

private void toggleTrayClick() {
  if (mainFrame.getExtendedState() == JFrame.ICONIFIED
      || !mainFrame.isActive()
      || !mainFrame.isVisible()) {
    mainFrame.setVisible(true);
    mainFrame.setAlwaysOnTop(true);
    mainFrame.setAlwaysOnTop(false);
    trayMenuMain.setLabel("Hide");
  } else {
    mainFrame.setVisible(false);
    trayMenuMain.setLabel("Show");
  }
}

代码示例来源:origin: RipMeApp/ripme

(!mainFrame.isVisible() || !mainFrame.isActive())) {
mainFrame.toFront();
mainFrame.setAlwaysOnTop(true);
trayIcon.displayMessage(mainFrame.getTitle(), "Started ripping " + ripper.getURL().toExternalForm(), MessageType.INFO);
mainFrame.setAlwaysOnTop(false);

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

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

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

JFrame frame = new JFrame ();
frame.setAlwaysOnTop (true);

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

public class Overlay {

  public static void main(String[] args) {
    JFrame frame = new JFrame("Transparent Window");
    frame.setUndecorated(true);
    frame.setBackground(new Color(0, 0, 0, 0));
    frame.setAlwaysOnTop(true);
    // Without this, the window is draggable from any non transparent
    // point, including points  inside textboxes.
    frame.getRootPane().putClientProperty("apple.awt.draggableWindowBackground", false);

    frame.getContentPane().setLayout(new java.awt.BorderLayout());
    frame.getContentPane().add(new JTextField("text field north"), java.awt.BorderLayout.NORTH);
    frame.getContentPane().add(new JTextField("text field south"), java.awt.BorderLayout.SOUTH);
    frame.setVisible(true);
    frame.pack();
  }
}

代码示例来源:origin: RaiMan/SikuliX2

public static JFrame getFrame(Object... args) {
 int x = Do.on().getCenter().x;
 int y = Do.on().getCenter().y;
 if (args.length > 0) {
  Object point = args[0];
  if (point instanceof Point) {
   x = ((Point) point).x;
   y = ((Point) point).y;
  } else if (point instanceof Frame) {
   return (JFrame) point;
  } else {
   x = ((Element) point).getCenter().x;
   y = ((Element) point).getCenter().y;
  }
 }
 JFrame anchor = new JFrame();
 anchor.setAlwaysOnTop(true);
 anchor.setUndecorated(true);
 anchor.setSize(1, 1);
 anchor.setLocation(x, y);
 anchor.setVisible(true);
 return anchor;
}
//</editor-fold>

代码示例来源:origin: fossasia/neurolab-desktop

jframe.setSize(100, height);
jframe.setLocation(width - 100, 0);
jframe.setAlwaysOnTop(true);
jframe.setUndecorated(true);
jframe.setVisible(true);

代码示例来源:origin: fossasia/neurolab-desktop

jframe.setSize(100, height);
jframe.setLocation(width - 100, 0);
jframe.setAlwaysOnTop(true);
jframe.setUndecorated(true);
jframe.setVisible(true);

代码示例来源:origin: RaiMan/SikuliX2

intro.setAlwaysOnTop(true);
intro.setResizable(false);
if (!log.isGlobalLevel(log.TRACE)) {
 intro.setAlwaysOnTop(true);

代码示例来源:origin: fossasia/neurolab-desktop

jframe.setSize(width - (width/5), height - (height/5));
jframe.setLocation((width/10), (height/10));
jframe.setAlwaysOnTop(true);

代码示例来源:origin: RaiMan/SikuliX2

box.setUndecorated(true);
box.setResizable(false);
box.setAlwaysOnTop(!log.isGlobalLevel(SXLog.TRACE));

代码示例来源:origin: fossasia/neurolab-desktop

gameFrame.setSize(width - (width / 5), height - (height / 5));
gameFrame.setLocation((width / 10), (height / 10));
gameFrame.setAlwaysOnTop(true);

代码示例来源:origin: RaiMan/SikuliX2

frame.setAlwaysOnTop(true);

代码示例来源:origin: RaiMan/SikuliX2

@Override
public void run() {
 frame.setUndecorated(true);
 frame.setAlwaysOnTop(true);

代码示例来源:origin: com.google.code.findbugs/findbugs

@Override
  public void run() {
    JFrame frame = messageFrame;
    if (frame != null) {
      frame.setAlwaysOnTop(false);
    }
  }
};

代码示例来源:origin: com.sikulix/sikulixapi

private static JFrame popLocation(int x, int y) {
 JFrame anchor = new JFrame();
 anchor.setAlwaysOnTop(true);
 anchor.setUndecorated(true);
 anchor.setSize(1, 1);
 anchor.setLocation(x, y);
 anchor.setVisible(true);
 return anchor;
}

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

JFrame frame = ...;
frame.setExtendedState(JFrame.NORMAL);
frame.setAlwaysOnTop(true);
frame.requestFocus();
frame.setAlwaysOnTop(false);

代码示例来源:origin: otros-systems/otroslogviewer

public static void frameToFront(JFrame frame) {
 int state = frame.getExtendedState();
 state &= ~JFrame.ICONIFIED;
 frame.setExtendedState(state);
 frame.setAlwaysOnTop(true);
 frame.toFront();
 frame.requestFocus();
 frame.setAlwaysOnTop(false);
}

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

JFrame frame= new JFrame();
frame.setAlwaysOnTop(true);
frame.setVisible(true);
FileDialog fd = new FileDialog(frame, "Save as", FileDialog.SAVE);
fd.setAlwaysOnTop(true);
fd.setVisible(true);
String path=fd.getDirectory().toString()+fd.getFile().toString();
  input=cl.getResourceAsStream(total_employee_record);
report=JasperCompileManager.compileReport(input);
parameters.put("mypic",inputimage);
print=JasperFillManager.fillReport(report, parameters,new              JRBeanCollectionDataSource(beanlist,false));

相关文章

JFrame类方法