javax.swing.JDialog.addHierarchyListener()方法的使用及代码示例

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

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

JDialog.addHierarchyListener介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-profiler

dialog.setLocationRelativeTo(mainWindow);
dialog.addHierarchyListener(new HierarchyListener() {
  public void hierarchyChanged(HierarchyEvent e) {
    if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0 && dialog.isShowing()) {

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui

private void createWaitDialog(String msg) {
 waitDialog = new JDialog(frame, frame.getTitle(), true);
 waitDialog.getRootPane().setWindowDecorationStyle(JRootPane.INFORMATION_DIALOG);
 waitDialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
 XContainer panel = new XContainer(new GridBagLayout());
 GridBagConstraints gbc = new GridBagConstraints();
 gbc.gridx = gbc.gridy = 0;
 gbc.fill = GridBagConstraints.HORIZONTAL;
 gbc.weightx = 1.0;
 gbc.insets = new Insets(5, 5, 5, 5);
 gbc.anchor = GridBagConstraints.NORTH;
 panel.add(waitMsgLabel = new XLabel("<html>" + msg + "</html>"), gbc);
 gbc.gridy++;
 gbc.fill = GridBagConstraints.BOTH;
 gbc.weighty = 1.0;
 panel.add(new XLabel(), gbc); // filler
 // waitMsgLabel.setFont((Font) appContext.getObject("message.label.font"));
 waitDialog.getContentPane().add(new JScrollPane(panel));
 waitDialog.pack();
 waitDialog.setSize(450, 150);
 WindowHelper.center(waitDialog, frame);
 waitDialog.addHierarchyListener(waitDialogListener = new WaitDialogListener());
}

相关文章

JDialog类方法