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

The wrapped word is not displayed properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0, 1.3.0_02, 1.3.1, 1.4.0
    • client-libs



      Name: yyT116575 Date: 04/04/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      When I try to type the following line 123456789012345678901234567890123456777777
      at the program below (do not resize the window or press CR), the wrapped word(first character)
      does not show properly on the next line. It displays right-half of the character. After typing the
      next character, then the first character will be correctly displayed.

      import java.awt.*;
      import java.awt.Window;
      import java.awt.event.*;
      import javax.swing.*;
      import javax.swing.text.*;

      class BasicWindowMonitor extends WindowAdapter {
        public void windowClosing(WindowEvent e) {
          Window w = e.getWindow();
          w.setVisible(false);
          w.dispose();
          System.exit(0);
        }
      }
      public class Diagnostic extends JPanel {
        // Create new new Diagnostic display using a black JTextPane
        public Diagnostic() {

          pane = new JTextPane();
          pane.setEditable(true);
          scrollpane = new JScrollPane();
          scrollpane.setPreferredSize(new Dimension(300,45));
          scrollpane.setViewportView(pane);
        }

        public Component getScrollpane() {return scrollpane;}
        private JTextPane pane;
        private JScrollPane scrollpane;

        // A sample test program
        public static void main(String[] args) {
          Diagnostic diag = new Diagnostic();
          JFrame f = new JFrame();

          f.addWindowListener(new BasicWindowMonitor());
          f.getContentPane().add(diag.getScrollpane());
          f.setVisible(true);
          f.pack();
        }
      }
      (Review ID: 120123)
      ======================================================================

            shickeysunw Shannon Hickey (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: