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

JTextArea.SCROLLBARS_VERTICAL_ONLY creates horizontal scrollbars

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.1.5
    • 1.1.3
    • client-libs
    • None
    • 1.1.5
    • generic
    • windows_nt
    • Not verified

      new JTextArea(SomeStr, 10, 10, JTextArea.SCROLLBARS_VERTICAL_ONLY);
      creates a horizontal scrollbar.

      import com.sun.java.swing.*;
      import java.awt.*;

      public class test4 extends JFrame {

          public test4() {
              setLayout(new BorderLayout());
              String SomeStr = "hello";
              JTextArea myTextArea = new JTextArea(SomeStr, 10, 10, JTextArea.SCROLLBARS_VERTICAL_ONLY);
              add("Center", myTextArea);
          }

          public static void main(String args[]) {
              test4 myWindow = new test4();
              myWindow.setTitle("My JTextArea Example");
              myWindow.pack();
              myWindow.show();
          }
      }

            tprinzing Tim Prinzing (Inactive)
            cahorton Catherine Horton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: