JDK-6189609 : REGRESSION: JComboBox does not render the dropdown list correctly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-11-02
  • Updated: 2010-04-02
  • Resolved: 2004-11-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.5.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
The first time the dropdown list is selected the window is missing a few pixels at the bottom and missing the black border. The second time the list is displayed it is correctly drawn.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A properly rendered dropdown list
ACTUAL -
see above.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.*;

public class AboutDialog extends JDialog implements ActionListener {
    private static final String CLOSE = "Close";

    JButton closeButton;

    public AboutDialog(JFrame parent) {
        addMainContent();
        addActionBar();
        pack();

        setLocationRelativeTo(parent);
    }

    private void addActionBar() {
        JPanel panel = new JPanel();

        closeButton = new JButton(CLOSE);
        panel.add(closeButton);
        closeButton.addActionListener(this);

        getContentPane().add(panel, BorderLayout.SOUTH);
    }

    private void addMainContent() {
        JPanel panel = new JPanel();
        panel.setLayout(new GridLayout(0,1,6,6));
        getContentPane().add(panel, BorderLayout.CENTER);

        JLabel label = new JLabel("Swing is...");
        label.setPreferredSize(new Dimension(200,20));
        label.setHorizontalAlignment(JLabel.CENTER);
        panel.add(label);
		String[] items = { "cool  as a cucumber", "clumsy as a clown", "crisp as a cocktail gherkin" };
		JComboBox choices = new JComboBox(items);
        panel.add(choices);
    }

    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == closeButton) {
            this.dispose();
        }
    }

	public static void main(String[] args) {
		new AboutDialog(null).setVisible(true);
	}
}

---------- END SOURCE ----------

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.
###@###.### 11/2/04 19:09 GMT

Comments
EVALUATION Another duplicate of AWT bug 5089312. ###@###.### 11/2/04 19:40 GMT
02-11-2004