JDK-4143714 : Cannot set Busy Cursor on JComboBox
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.1.5
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_95
  • CPU: x86
  • Submitted: 1998-05-29
  • Updated: 1998-06-01
  • Resolved: 1998-06-01
Related Reports
Duplicate :  
Description

Name: el35337			Date: 05/28/98


Hello.

I am able to set the Cursor to busy on all
of my Swing components sitting on a JFrame except
when I use the JComboBox. Where I set my cursor
has no effect either (Before and after population
of the ComboBox). I am using Swing 1.0.2
on Win 95 with JDK1.1.5. 

I have tried to set the cursor using a loop with
the getComponents() method from
the container but that worked for every component
except JComboBox.

Here is a simplified version of the code to 
isolate the problem.

import com.sun.java.swing.*;
import java.awt.*;

class TestCursor extends JFrame{

    JComboBox abox = new JComboBox();

    public TestCursor(){
        initialize();
    }

    public void initialize(){

        abox.addItem("    ");

        getContentPane().add(abox);
        setSize(500,500);
        setVisible(true);
        abox.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
         }

    public static void main(String args[]){
        TestCursor test = new TestCursor();
     
     }}
(Review ID: 32264)
======================================================================

Comments
EVALUATION This is because JComboBoxes are compound components. I'm marking this as a duplicate of bug 4144505. tom.santos@eng 1998-06-01
01-06-1998