Java JTextArea columns(JTextArea testString)

Here you can find the source of columns(JTextArea testString)

Description

columns

License

Open Source License

Declaration

static int columns(JTextArea testString) 

Method Source Code


//package com.java2s;
import javax.swing.JTextArea;

public class Main {
    static int columns(JTextArea testString) {
        return Math.min((int) (testString.getText().length() * 0.66), 80);
    }/*from  w  ww.jav  a  2s.  com*/
}

Related

  1. appendNewLine(final JTextArea textArea, final String line)
  2. applyDefaultProperties(final JTextArea comp)
  3. attachSimpleUndoManager(JTextArea jta)
  4. blockUncomment(JTextArea scriptPanel)
  5. clearTextArea(JTextArea textArea)
  6. commentSQL(JTextArea scriptPanel, String commentCharacter)
  7. copyFontAndMargins(final JTextArea target, final JComponent source)
  8. createTabArea(JTextArea area, int width)
  9. display(JTextArea txtOutput, String text)