Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4140417

JComboBox.setLightWeightPopupEnabled does not always work on Solaris

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.2.0
    • client-libs



      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)
      ======================================================================

            gsaab Georges Saab
            rkarsunw Ralph Kar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: