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

Style of TextField has been changed since jdk7u6

XMLWordPrintable



      In JDK7fcs-jdk7u5, a plain textfield appears.
      In JDK7u6 and later, a dent textfield appears.

      Test case is as follows.

      --- TextFieldTest.java --->

      import java.awt.*;
      import java.awt.event.*;

      public class TextFieldTest extends Frame {

          TextField tf = new TextField(20);

          public static void main(String ar[]){
              Frame f = new TextFieldTest();
              f.setSize(200,200);
              f.setVisible(true);
          }

          TextFieldTest(){
              addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent e) {
                      System.exit(0);
                  }
              });

              setLayout(new FlowLayout());
              tf.setBackground(Color.YELLOW);
              add(tf);
          }
      }

      <-------------------


      Please compile the above test case and run "java TextFieldTest" both in
      jdk7u5 and 7u65.
      You can see the difference between jdk7u5 and 7u65.
       

            anashaty Anton Nashatyrev (Inactive)
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: