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

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

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

JDialog.revalidate介绍

暂无

代码示例

代码示例来源:origin: org.verapdf.apps/gui

private void removeLineFromMainPanel(int index) {
  if (index >= 0 && index < this.layoutPanels.size()) {
    this.assertionsPanel.remove(index);
    this.featureTypes.remove(index);
    this.features.remove(index);
    this.operations.remove(index);
    this.arguments.remove(index);
    this.removeLineButtons.remove(index);
    this.layoutPanels.remove(index);
    this.dialog.revalidate();
    this.dialog.repaint();
  }
}

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

JDialog zMessageDialog = new JDialog((java.awt.Frame) null, true);
 zMessageDialog.setTitle("Order summary");
 zMessageDialog.setLayout(new BorderLayout());
 JTextArea zTextArea = new JTextArea("Blah blah\nblah blah\nblah blah");
 zTextArea.setEditable(false);
 zTextArea.setColumns(40);
 zTextArea.setRows(10);
 zTextArea.setBackground(null);
 JScrollPane zScrollPane = new JScrollPane(zTextArea);
 zMessageDialog.add(zScrollPane, BorderLayout.CENTER);
 zMessageDialog.revalidate();
 zMessageDialog.pack();
 zMessageDialog.setVisible(true);

代码示例来源:origin: org.verapdf.apps/gui

this.assertionsPanel.add(linePanel);
this.dialog.revalidate();
this.dialog.repaint();
JScrollBar vertical = this.scrollPane.getVerticalScrollBar();

代码示例来源:origin: senbox-org/snap-desktop

@Override
public int show() {
  getJDialog().revalidate();
  if (this.currentOperation == OperationType.FORCED_EDIT) {
    if (BundleInstaller.isBundleFileAvailable(this.oldOperatorDescriptor.getBundle())) {
      SwingUtilities.invokeLater(() -> {
        Dialogs.Answer answer = Dialogs.requestDecision("Bundle Available", "A bundle has been configured for this adapter.\n" +
            "Do you want to proceed with bundle download/installation?", false, null);
        if (answer == Dialogs.Answer.YES) {
          if (downloadAction != null) {
            try {
              downloadAction.call();
            } catch (Exception e) {
              logger.warning(e.getMessage());
            }
          }
        } else {
          onOK();
        }
      });
    } else {
      SwingUtilities.invokeLater(this::onOK);
    }
  }
  return super.show();
}

相关文章

JDialog类方法