Combobox background color


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Combobox background color

  1. #1
    Join Date
    Oct 2004
    Posts
    1

    Combobox background color

    hi i am karunakaran,
    new user to this forum. I face one problem in java programming.

    I set background color to combobox using
    JCombobox com;
    com.setBackGround(Color.blue);

    I works correctly.
    But once i make this combox disabled.
    ie) com.setEnabled(false);

    It go back to default color(gray).

    How can i change this color .

    reply soon.
    thanks
    karunakaran

    There are 10 types of people.one who knows binary and others do not.

  2. #2
    Join Date
    Oct 2004
    Posts
    311
    This is also a property you can set. Have you checked the JavaDoc at sun? (java.sun.com) there should be information there that will tell you how to set the disbled BGColor.

  3. #3
    Join Date
    Feb 2004
    Posts
    808
    set it enabled again

    things go grey when they are diabled, for a REASON:

    people look at a grey thing and think "oh, that is disabled" because that is the way it has always been. if you make your combobox blue and hence it looks like it is enabled, but it is actually disabled, then they wont like using your program, because you are lying to them

    i wont start a long discussion about this.. the topic area of interest is called HCI, and i think you need to read up on it.. many factors come into play, including user psychology and they way they think. good knowledge of HCI is the only think that can save you from writing a shoddy, awkward and rubbish user interface
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center