Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4128492

JTextArea.getLineCount() of empty JTextArea returns 1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.2.0
    • 1.1.5
    • client-libs
    • swing1.1
    • generic
    • generic



      Name: rk38400 Date: 04/13/98


      This code outputs "Lines on empty: 1", which is
      not what I expected.

      import com.sun.java.swing.*;
      public class Test{
        public static void main( String[] args ) {
          JTextArea textArea = new JTextArea();
          int lines = textArea.getLineCount();
          System.out.println("Lines on empty: " + Integer.toString( lines ) );

        }
      }

      How many bug reports do I need to get a T-shirt?
      (Review ID: 26646)
      ======================================================================

            tprinzing Tim Prinzing (Inactive)
            rkarsunw Ralph Kar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: