JDK-6247480 : Support for Windows XP Common Controls in AWT Components
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-03-29
  • Updated: 2005-03-30
  • Resolved: 2005-03-30
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
The components in AWT (Button, CheckBox, TextField) look in Windows XP like the old Win 95/98/NT/2K components. Swing applications look similar to Windows XP applications when using the System Look and Feel, but AWT applications look like older applications. BUG: If you manually add a javaw.exe.manifest (as required by winxp to use new common controls) to J2SE/bin, the AWT components show weird look.

JUSTIFICATION :
This enhancement is needed to make Java Applications using AWT components look like native Windows XP GUI applications.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Java applications using AWT components should look like native Windows XP GUI applications.

---------- BEGIN SOURCE ----------
public class Main extends Frame {

    public Main() {
        setTitle("Sample AWT Application");
        Panel panel = new Panel(new FlowLayout());
        panel.add(new Label("Sample Label"));
        panel.add(new Checkbox("Sample Check Box"));
        panel.add(new TextField("Sample Text Field"));
        Button button;
        panel.add(button = new Button("Sample Button"));
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                FileDialog dlg = new FileDialog(Main.this, "Select File");
                dlg.show();
            }
        });
        add(panel);
        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent evt) {
                dispose();
            }
        });
        pack();
    }

    public static void main(String[] args) {
        Main main = new Main();
        main.show();
    }
}
</pre>
---------- END SOURCE ----------
###@###.### 2005-03-29 18:12:10 GMT