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

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

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

JFrame.getListeners介绍

暂无

代码示例

代码示例来源:origin: JChemPaint/jchempaint

/**
 * Closes all currently opened JCP instances.
 */
public static void closeAllInstances() {
  int instancesNumber = instances.size();
  for (int i = instancesNumber - 1; i >= 0; i--) {
    JFrame frame = (JFrame) instances.get(i).getTopLevelContainer();
    WindowListener[] wls = (WindowListener[]) (frame
        .getListeners(WindowListener.class));
    wls[0].windowClosing(new WindowEvent(frame,
        WindowEvent.WINDOW_CLOSING));
  }
}

代码示例来源:origin: com.github.tntim96/rhino

frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
final EventListener[] l =
  frame.getListeners(WindowListener.class);
frame.removeWindowListener((WindowListener)l[0]);
frame.addWindowListener(new WindowAdapter() {

代码示例来源:origin: com.github.houbie/rhino-mod

frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
final EventListener[] l =
  frame.getListeners(WindowListener.class);
frame.removeWindowListener((WindowListener)l[0]);
frame.addWindowListener(new WindowAdapter() {

代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger

frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
final EventListener[] l =
  frame.getListeners(WindowListener.class);
frame.removeWindowListener((WindowListener)l[0]);
frame.addWindowListener(new WindowAdapter() {

代码示例来源:origin: ro.isdc.wro4j/rhino

frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
final EventListener[] l =
  frame.getListeners(WindowListener.class);
frame.removeWindowListener((WindowListener)l[0]);
frame.addWindowListener(new WindowAdapter() {

相关文章

JFrame类方法