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

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

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

JTextArea.revalidate介绍

暂无

代码示例

代码示例来源:origin: eu.mihosoft.vrl/vrl

@Override
public void setViewValue(Object o) {
  emptyView();
  editor.getEditor().setText(o.toString());
  editor.setPreferredSize(null);
  editor.getEditor().revalidate();
}

代码示例来源:origin: aerospike/aerospike-client-java

public void actionPerformed(ActionEvent e) {
  String example = e.getActionCommand();
  String sourceText = readfile(sourcePath + example + ".java");
  if (0 == sourceText.length()) {
    // did not get source code content, ask the user for location and give it one more try
    SourcePathDialog spDialog = new SourcePathDialog(frmAerospikeExamples);
    spDialog.setVisible(true);
    if (0 < sourcePath.length()) {
      if (sourcePath.charAt(sourcePath.length()-1) != '/') 
        sourcePath += "/";
      sourceText =  readfile(sourcePath + example + ".java");
      if (0 == sourceText.length()) {
        sourceText = "Failed to read source file: " + sourcePath + example + ".java";
      }
    }
  }
  if (0 == sourceText.length()) {
    // user no longer want to see skip source window from this point on?
    if (0 == sourcePath.length()) {
      sourceTextPane.setText("");
    }
  }
  else {
    sourceTextPane.setText(sourceText);
    sourceTextPane.setSize(sourceTextPane.getPreferredSize());
    sourceTextPane.setCaretPosition(0);
    sourceTextPane.revalidate();
  }
}

相关文章

JTextArea类方法