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