JDK-8051691 : Style of TextField has been changed since jdk7u6
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u65
  • Priority: P3
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2014-07-23
  • Updated: 2014-11-21
  • Resolved: 2014-09-30
Related Reports
Relates :  
Description

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.
 

Comments
This is the effect of the JDK-7092551 fix: the underlying native text component has been changed. Thus the appearance has been also changed. Since the appearance of the text field became aligned with the appearance of all other components there is no much sense to somehow address this problem.
05-09-2014

The reason this issue is the same as JDK-8056914. Please see its comments for deatils.
05-09-2014