FULL PRODUCT VERSION :
java version "1.7.0-ea"
java(TM) SE Runtime Environment (build 1/7/0-ea-b29)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.0.6001]
A DESCRIPTION OF THE PROBLEM :
The method setVisible should show a component that has been added but set so it is not visible.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the code below, or see it in action at http://www.segal.org/java/ShowComponent/
2. Click the button "Click to make a hidden button appear"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A button "This button was hidden" should appear
ACTUAL -
Using Java 1.7 build 25 the button does not appear.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Source code:
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class ShowComponent extends Applet implements ActionListener {
Button button1, button2;
public void init()
{
button1 = new Button("Click to make a hidden button appear");
add(button1);
button1.addActionListener(this);
button2 = new Button("This button was hidden");
add(button2);
button2.setVisible(false);
}
public void actionPerformed(ActionEvent ae)
{
if (ae.getSource() == button1)
{
button2.setVisible(true);
invalidate();
validate();
}
}
} // END OF Class ShowComponent
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None. This last worked in build 23.
Release Regression From : 7
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.