Steps to reproduce: 1. Compile and run the attached testcase. Expected results: 1. A window with a check box and "text1" shows up.
Actual results: 1. A window with "text1" shows up. No check box is visible. Testcase: import java.awt.*; import javax.swing.*; public class testcase extends JFrame { public static void main(String[] args) { new testcase().show(); } public testcase() { JCheckBox checkbox = new JCheckBox("text1" , true); setContentPane(checkbox); setSize(new Dimension(300, 300)); } } The check box is visible with gnu classpath cvs 2005-07-15T11:38:00+0000 but missing with gnu classpath cvs 2005-07-15T11:45:00+0000. Diff between these versions shows the following changelog entry: +2005-07-15 Roman Kennke <[EMAIL PROTECTED]> + + * javax/swing/AbstractButton.java + (AbstractButton): Directly call init() and updateUI(). + (AbstractButton(String, Icon)): Removed. This is not necessary + since we have init(String, Icon) for that purpose. + (getActionCommand): Reverted to previous behaviour: If + actionCommand is set, return this, otherwise return text, even + if text is null. + * javax/swing/JButton.java + (JButton(String, Icon)): Call super() and init(String, Icon) + instead of super(String, Icon). + * javax/swing/JMenuItem.java + (JMenuItem): Call super() instead of super(String, Icon). + (JMenuItem(Icon)): Call this(String, Icon) instead of + super(String, Icon). + (JMenuItem(String)): Call this(String, Icon) instead of + super(String, Icon). + (JMenuItem(Action)): Call super() instead of + super(String, Icon). + (JMenuItem(String, Icon)): Call super() and init(String, Icon) + instead of super(String, Icon). + (JMenuItem(String, int)): Call this(String, Icon) instead of + super(String, Icon). + * javax/swing/JToggleButton.java + (ToggleButtonModel.setPressed): Fire an ActionEvent if button + is released. According to my Mauve tests, it seems that this + is what the JDK does, so do we. + (ToggleButtonModel.setSelected): Removed. + (JToggleButton): Call super() and init(String, Icon) instead + of super(String, Icon). + -- Summary: JCheckBox's check box is missing Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: SWING AssignedTo: graydon at redhat dot com ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22567