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

joining two HTML paragraphs creates an extra component

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • client-libs
    • beta
    • x86
    • windows_nt



      Name: rlT66838 Date: 05/02/2000


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


      1. Compile and run included code
      2. Place the insertion point at the beginning of the second line
         just before the first letter
      3. Hit 'Backspace'

      Expected result:
        The second line merges with the first line.

      Observed results:
        The second line merges with the first line, but it leaves
        a copy of the text box behind. Now there are still two
        lines of text and an extra text box in the second line.


      import java.awt.*;
      import java.util.*;
      import javax.swing.*;
      import javax.swing.text.*;
      import javax.swing.text.html.*;

      public class test1 extends JPanel
      {
         private JEditorPane html1;

         public static void main( String args[] )
         {
            JFrame frame = new JFrame("Test");
            frame.setContentPane( new test1() );
            frame.setBounds(100,100,300,200);
            frame.show();
         }

         public test1()
         {
            html1 = new JEditorPane();
            html1.setEditorKit( new HTMLEditorKit() );
            html1.setText("<p>field1: <INPUT size='3'></p><p> field2: <INPUT size='3'></p>");
            add( html1, BorderLayout.CENTER );
       }
        
      }
      (Review ID: 104275)
      ======================================================================

            shickeysunw Shannon Hickey (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: