-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1, 1.1.5, 1.1.6, 1.2.0
-
None
-
generic, x86, sparc
-
solaris_2.5, solaris_2.6, solaris_10, windows_nt
JComboBox.setLightWeightPopupEnabled() is supposed to allow a program to
instruct the combobox whether or not lightweight popups should be used.
This doesn't seem to work at all, ast he program below demonstrates:
import java.awt.*;
import com.sun.java.swing.*;
public class Test extends JFrame {
public Test() {
super("Mix Popup Test");
Box box = Box.createVerticalBox();
getContentPane().add("Center", box);
// Create Lightweight Swing ComboBox
JComboBox light = new JComboBox();
light.setLightWeightPopupEnabled(false);
light.addItem("Apple ");
light.addItem("Plum ");
light.addItem("Banana ");
light.addItem("Cherry ");
// Create Heavyweight AWT Button
Button heavy = new Button("Heavyweight Button");
// Add light & heavy components to box
box.add(Box.createVerticalStrut(40));
box.add(light);
box.add(Box.createVerticalStrut(20));
box.add(heavy);
box.add(Box.createVerticalStrut(40));
pack();
}
public static void main(String[] args) {
Test t = new Test();
t.show();
}
}
erik.larsen@Eng 1998-06-09
webbug from ###@###.###
JPopupMenu.setLightWeightPopupEnabled(false) does not work on Solaris. Popup menus are obscured by heavyweight components even when lightweight menus are turned off. Under WinNT4, it works. It fails under Solaris.
import java.awt.*;
import com.sun.java.swing.*;
public class MenuBug extends JFrame {
public static void main(String args[]) {
new MenuBug().setVisible(true);
}
public MenuBug() {
getContentPane().add(new Canvas(), BorderLayout.CENTER);
JMenuBar jcMenubar = new JMenuBar();
JMenu jcMenu = new JMenu("File");
jcMenu.getPopupMenu().setLightWeightPopupEnabled(false);
jcMenu.add(new JMenuItem("Item 1"));
jcMenu.add(new JMenuItem("Item 2"));
jcMenu.add(new JMenuItem("Item 3"));
jcMenu.add(new JMenuItem("Item 4"));
jcMenubar.add(jcMenu);
setJMenuBar(jcMenubar);
setSize(300, 300);
}
}
instruct the combobox whether or not lightweight popups should be used.
This doesn't seem to work at all, ast he program below demonstrates:
import java.awt.*;
import com.sun.java.swing.*;
public class Test extends JFrame {
public Test() {
super("Mix Popup Test");
Box box = Box.createVerticalBox();
getContentPane().add("Center", box);
// Create Lightweight Swing ComboBox
JComboBox light = new JComboBox();
light.setLightWeightPopupEnabled(false);
light.addItem("Apple ");
light.addItem("Plum ");
light.addItem("Banana ");
light.addItem("Cherry ");
// Create Heavyweight AWT Button
Button heavy = new Button("Heavyweight Button");
// Add light & heavy components to box
box.add(Box.createVerticalStrut(40));
box.add(light);
box.add(Box.createVerticalStrut(20));
box.add(heavy);
box.add(Box.createVerticalStrut(40));
pack();
}
public static void main(String[] args) {
Test t = new Test();
t.show();
}
}
erik.larsen@Eng 1998-06-09
webbug from ###@###.###
JPopupMenu.setLightWeightPopupEnabled(false) does not work on Solaris. Popup menus are obscured by heavyweight components even when lightweight menus are turned off. Under WinNT4, it works. It fails under Solaris.
import java.awt.*;
import com.sun.java.swing.*;
public class MenuBug extends JFrame {
public static void main(String args[]) {
new MenuBug().setVisible(true);
}
public MenuBug() {
getContentPane().add(new Canvas(), BorderLayout.CENTER);
JMenuBar jcMenubar = new JMenuBar();
JMenu jcMenu = new JMenu("File");
jcMenu.getPopupMenu().setLightWeightPopupEnabled(false);
jcMenu.add(new JMenuItem("Item 1"));
jcMenu.add(new JMenuItem("Item 2"));
jcMenu.add(new JMenuItem("Item 3"));
jcMenu.add(new JMenuItem("Item 4"));
jcMenubar.add(jcMenu);
setJMenuBar(jcMenubar);
setSize(300, 300);
}
}
- duplicates
-
JDK-4140417 JComboBox.setLightWeightPopupEnabled does not always work on Solaris
-
- Closed
-
-
JDK-4110508 JComboBox popup has painting problems.
-
- Closed
-
-
JDK-4114603 The JComboBox "pop-down" list box still doesn't paint when in Dialog
-
- Closed
-
-
JDK-4128118 JPopupMenu/JComboBox popup weight in Beans
-
- Closed
-
-
JDK-4168483 Mediumweight popup problem on Solaris
-
- Closed
-
- relates to
-
JDK-4812585 BasicComboBoxUI.FocusHandler doesn't hide popup menu when focus is lost
-
- Closed
-
(1 relates to)