I have a JFrame with widht & height of 300. I have added a JComboBox to the north of the frame & heavy weight (AWT ) button to the center of JFrame. When i click on the JComboBox . the popup menu is not seen. i,e the popup goes behind the AWT Button. I tried resizing the frame to widht & height of 200 , then when i repeated the same scenario, the choice's popup is seen. This is one of the common scenario, that can be tried after fixing the mixing of heavy weight & light weight components feature.
Step to reproduce :-
--------------------
1) Run the below testcase.
2) Click on the JComboBox, if you see the popup , then the bug is reproduced.
I tested this on 6u12 b01 pit build & jdk7 b38 promoted build.
=================== TestCase =======================
import javax.swing.*;
import java.awt.*;
import java.util.Vector;
public class TestLwComboBoxAndHwButton {
JComboBox ch = null;
JFrame frame = null;
TestLwComboBoxAndHwButton(){
frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Vector v = new Vector();
for(int i = 1 ; i <=20;i++){
v.add("Item # "+i);
}
ch = new JComboBox(v);
frame.add(ch,BorderLayout.NORTH);
frame.add(new Button("AWT Button"),BorderLayout.CENTER);
frame.setSize(300,300);
frame.setVisible(true);
}
public static void main(String []args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
new TestLwComboBoxAndHwButton();
}
});
}
}
====================================================