/**
* Displays the GUI during a RAD session. If the root component is neither a JFrame nor a JDialog, the a JFrame is
* instantiated and the root is added into the new frames contentpane.
*/
public void test() {
WindowListener wl = new WindowAdapter() {
public void windowClosing(WindowEvent e) {
super.windowClosing(e);
System.exit(0);
}
};
if (root != null) {
if (JFrame.class.isAssignableFrom(root.getClass())
|| JDialog.class.isAssignableFrom(root.getClass())) {
((Window) root).addWindowListener(wl);
root.setVisible(true);
} else {
JFrame jf = new JFrame("SwiXml Test");
jf.getContentPane().add(root);
jf.pack();
jf.addWindowListener(wl);
jf.setVisible(true);
}
}
}
SwingEngine.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:msInspect
作者:
评论列表
文章目录