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

setBackground on JComboBox gives an Exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.3.0
    • 1.3.0
    • client-libs
    • 1.3
    • x86
    • solaris_7



      Name: sl110371 Date: 07/17/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-beta_refresh)
      Java HotSpot(TM) Client VM (build 1.3.0-beta_refresh, mixed mode)


      Here is a simple applet that reproduce the problem. Run it on the 1.3.0 beta
      refresh plug-in.

      package ntdca.report;

      import java.awt.*;
      import javax.swing.*;

      public class Applet1 extends JApplet {

        //Initialize the applet
        public void init() {
          try{
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            this.getContentPane().setLayout(new BorderLayout());
            JComboBox box=new JComboBox();
            this.getContentPane().add(box,BorderLayout.NORTH);
            box.setBackground(Color.blue);
            box.addItem("Ciao");
          }catch(Exception ex){ex.printStackTrace();}
        }
      }

      The same code works good on PC
      (Review ID: 107276)
      ======================================================================

            herrick Andy Herrick (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: