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

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

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

JTextArea.setRows介绍

暂无

代码示例

代码示例来源:origin: marytts/marytts

taDescription.setFont(new java.awt.Font("Courier New", 0, 10));
taDescription.setLineWrap(true);
taDescription.setRows(2);
taDescription.setText(desc.getDescription());
spDescription.setViewportView(taDescription);

代码示例来源:origin: marytts/marytts

taDescription.setFont(new java.awt.Font("Courier New", 0, 10));
taDescription.setLineWrap(true);
taDescription.setRows(2);
taDescription.setText(desc.getDescription());
spDescription.setViewportView(taDescription);

代码示例来源:origin: marytts/marytts

jTextArea1.setFont(new java.awt.Font("Courier New", 0, 10));
jTextArea1.setLineWrap(true);
jTextArea1.setRows(2);
jTextArea1.setText(desc.getDescription());
jScrollPane1.setViewportView(jTextArea1);

代码示例来源:origin: marytts/marytts

jTextArea1.setFont(new java.awt.Font("Courier New", 0, 10));
jTextArea1.setLineWrap(true);
jTextArea1.setRows(2);
jTextArea1.setText(desc.getDescription());
jScrollPane1.setViewportView(jTextArea1);

代码示例来源:origin: jersey/jersey

messagesArea.setRows(5);
messagesArea.setWrapStyleWord(true);
messagesArea.setFocusable(false);

代码示例来源:origin: magefree/mage

/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
  popupText = new javax.swing.JTextArea();
  setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
  setLayout(new java.awt.BorderLayout());
  popupText.setBackground(new java.awt.Color(204, 204, 204));
  popupText.setColumns(20);
  popupText.setEditable(false);
  popupText.setLineWrap(true);
  popupText.setRows(1);
  popupText.setWrapStyleWord(true);
  popupText.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 2, 2, 2));
  add(popupText, java.awt.BorderLayout.PAGE_START);
}// </editor-fold>//GEN-END:initComponents

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

textArea.setRows(1);
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);

代码示例来源:origin: magefree/mage

lblMessage.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N
lblMessage.setLineWrap(true);
lblMessage.setRows(5);
lblMessage.setWrapStyleWord(true);
jScrollPane1.setViewportView(lblMessage);
jTextArea1.setEditable(false);
jTextArea1.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N
jTextArea1.setRows(2);
jTextArea1.setText("An error has occurred on the MAGE server. Your last action will be rollbacked.\nPlease post the following report here: http://www.slightlymagic.net/forum/posting.php?mode=reply&f=70&t=3116");
jScrollPane2.setViewportView(jTextArea1);

代码示例来源:origin: geotools/geotools

textArea.setLineWrap(true);
textArea.setText(sampleText);
textArea.setRows(sampleTextLines);
JScrollPane scrollPane = new JScrollPane(textArea);
panel.add(scrollPane, "span, height 200, growx");

代码示例来源:origin: magefree/mage

txtFeedbackMessage.setRows(5);
txtFeedbackMessage.setText("(300 characters max)");
jScrollPane1.setViewportView(txtFeedbackMessage);

代码示例来源:origin: winder/Universal-G-Code-Sender

private void initComponents() {
  consoleTextArea.setEditable(false);
  consoleTextArea.setColumns(20);
  consoleTextArea.setDocument(new LengthLimitedDocument(CONSOLE_SIZE));
  consoleTextArea.setRows(5);
  consoleTextArea.setMaximumSize(new java.awt.Dimension(32767, 32767));
  consoleTextArea.setMinimumSize(new java.awt.Dimension(0, 0));
  scrollPane.setViewportView(consoleTextArea);
  commandLabel.setEnabled(backend.isIdle());
  scrollWindowMenuItem.addActionListener(e -> checkScrollWindow());
  setLayout(new MigLayout("inset 0 0 5 0, fill, wrap 1", "", "[][min!]"));
  add(scrollPane, "grow, growy");
  add(commandLabel, "gapleft 5, al left, split 2");
  add(commandTextField, "gapright 5, r, grow");
  menu.add(showVerboseMenuItem);
  menu.add(scrollWindowMenuItem);
  SwingHelpers.traverse(this, (comp) -> comp.setComponentPopupMenu(menu));
}

代码示例来源:origin: net.sf.meka/meka

/**
 * Sets the rows.
 *
 * @param value    the rows
 */
public void setRows(int value) {
  m_TextCode.setRows(value);
}

代码示例来源:origin: winder/Universal-G-Code-Sender

consoleTextArea.setColumns(20);
consoleTextArea.setDocument(new LengthLimitedDocument(consoleSize));
consoleTextArea.setRows(5);
consoleTextArea.setMaximumSize(new java.awt.Dimension(32767, 32767));
consoleTextArea.setMinimumSize(new java.awt.Dimension(0, 0));

代码示例来源:origin: worstcase/gumshoe

public JComponent getDetailField() {
  if(detailField==null) {
    detailField = new JTextArea();
    detailField.setRows(40);
    detailField.setColumns(60);
  }
  return detailField;
}

代码示例来源:origin: undera/jmeter-plugins

public static JScrollPane getTextAreaScrollPaneContainer(JTextArea textArea, int nbLines) {
  JScrollPane ret = new JScrollPane();
  textArea.setRows(nbLines);
  textArea.setColumns(20);
  ret.setViewportView(textArea);
  return ret;
}

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

JTextArea textArea = new JTextArea();
textArea.setColumns(10);
textArea.setRows(1);
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);

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

JTextArea mytext = new JTextArea();
mytext.setText("mytextline1\nmytextline2\nmytextline3\nmytextline4\nmytextline5\nmytextline6");
mytext.setRows(5);
mytext.setColumns(10);
mytext.setEditable(true);
JScrollPane mypane = new JScrollPane(mytext);

Object[] objarr = {
  new JLabel("Enter some text:"),
  mypane,
};

JOptionPane Optpane = new JOptionPane(objarr, JOptionPane.PLAIN_MESSAGE);

代码示例来源:origin: fr.ifremer/isis-fish

protected void createVariableComment() {
  $objectMap.put("variableComment", variableComment = new JTextArea());
  
  variableComment.setName("variableComment");
  variableComment.setColumns(15);
  variableComment.setLineWrap(true);
  variableComment.setWrapStyleWord(true);
  variableComment.setRows(3);
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * Overrides {@link #getPromptComponent(JTextComponent)} to additionally
 * update {@link JTextArea} specific properties.
 */
@Override
public JTextComponent getPromptComponent(JTextComponent txt) {
  JTextArea lbl = (JTextArea) super.getPromptComponent(txt);
  JTextArea txtArea = (JTextArea) txt;
  lbl.setColumns(txtArea.getColumns());
  lbl.setRows(txtArea.getRows());
  return lbl;
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * Overrides {@link #getPromptComponent(JTextComponent)} to additionally
 * update {@link JTextArea} specific properties.
 */
@Override
public JTextComponent getPromptComponent(JTextComponent txt) {
  JTextArea lbl = (JTextArea) super.getPromptComponent(txt);
  JTextArea txtArea = (JTextArea) txt;
  lbl.setColumns(txtArea.getColumns());
  lbl.setRows(txtArea.getRows());
  return lbl;
}

相关文章

JTextArea类方法