jQuery in Action, 3rd edition
The moose likes Swing / AWT / SWT and the fly likes Color the JComboBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Color the JComboBox" Watch "Color the JComboBox" New topic

Color the JComboBox

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Hi all,

when I setBackground(Color.green) my JComboBox it colors only the arrow (I set the combobox to setEditable(true)).

how can i color the textFiled of the jcombobox as well?
K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375

Try using the method: setForeground(Color c).
I agree. Here's the link: http://aspose.com/file-tools
subject: Color the JComboBox
jQuery in Action, 3rd edition