-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.2.0
-
sparc
-
solaris_2.6
Name: rk38400 Date: 05/20/98
As you will be able to see from the following code,
setting the popup flag in this instance of a
JComboBox does not produce the desired result on
Solaris.
import java.awt.*;
import java.awt.swing.*;
public class SunTest4 {
public static void main(String argv[])
{
JFrame frame = new JFrame();
frame.getContentPane().setLayout(new BorderLayout());
frame.getContentPane().add(setUpNorthPanel(),BorderLayout.NORTH);
frame.getContentPane().add(setUpCenterPanel(),BorderLayout.CENTER);
frame.setVisible(true);
frame.setSize(400,400);
}
private static JPanel setUpNorthPanel()
{
JPanel p = new JPanel();
JMenuBar mb = new JMenuBar();
JMenu menu = new JMenu("File");
menu.add("One");
menu.add("Two");
menu.add("Three");
menu.add("Four");
menu.add("Five");
mb.add(menu);
String s[] = {"One","Two","Three","Four","Five"};
JComboBox c = new JComboBox(s);
c.setLightWeightPopupEnabled(false);
p.add(mb);
p.add(c);
return p;
}
private static Panel setUpCenterPanel()
{
Panel p = new Panel();
p.add(new JLabel("Light Weight JLabel on Heavy Weight Panel"));
return p;
}
}
(Review ID: 30704)
======================================================================
- duplicates
-
JDK-4112982 JComboBox.setLightWeightPopupEnabled(false) fails to turn off lightweight popup
-
- Closed
-