Background « JComboBox « Java Swing Q&A





1. Can I modify JComboBox popup background color of an existing object?    stackoverflow.com

I have an existing JComboBox object. I can modify many of its properties using the internal methods. However, I could not find similar methods to customize the popup's appearance - specifically, ...

2. Background color of the selected item in an uneditable JComboBox    stackoverflow.com

The background color of the selected item in an uneditable JComboBox is a sort of blue: alt text Is there any way to make this a different color, such as white, ...

3. Customized JCombobox default selection background color is not visible    stackoverflow.com

I have created customized combobox which extends JCombobox. It is having checkboxes in popup list. When I try to select/check checkbox inside popup there is not selection color. I tried to set ...

4. Editable JComboBox Background color    stackoverflow.com

I have a editable combobox, but I am not able to change its background color. Tried

((JTextField) myJComboBox.getEditor().getEditorComponent())
#setBackground(Color.xxxx);
ref: Change JComboBox colours WITHOUT renderer
But it doesn't seem to work Any ...

5. JComboBox on Background Image    coderanch.com

6. how to set the "background selection color" of a Combobox    coderanch.com

Hi, the default lavender color bites with windows desktop colors. But how to set this color? I mean the highlighting color when you scroll through the combobox. Am hovering over the colors of good-looking eclipse guis with a colorpicker and use those colors in my gui. It seems to work. regards Axel [ July 15, 2003: Message edited by: Axel Janssen ...

7. Image background for a JComboBox    coderanch.com

8. Non Editable JComboBox background color    coderanch.com

import javax.swing.*; import java.awt.*; class Testing extends JFrame { JComboBox cbo = new JComboBox(new String[]{"London","Madrid","New York","Rome","Sydney","Washington"}); public Testing() { setSize(150,75); setLocation(400,300); setDefaultCloseOperation(EXIT_ON_CLOSE); cbo.setBackground(Color.RED); cbo.setRenderer(new MyRenderer()); JPanel jp = new JPanel(); jp.add(cbo); getContentPane().add(jp); } public static void main(String args[]){new Testing().setVisible(true);} } class MyRenderer extends DefaultListCellRenderer { public Component getListCellRendererComponent(JList list,Object value, int index,boolean isSelected,boolean cellHasFocus) { JLabel lbl = (JLabel)super.getListCellRendererComponent(list,value,index,isSelected,cellHasFocus); lbl.setText((String)value); lbl.setOpaque(false); ...

9. The color of arrow button in JCombobox is getting changed when chaging its background    coderanch.com

Hi, There is a JCombobox in my application, it is a swing application. When I am changing the background color of the combobox, it is working fine, it is changing only its background color without changing the color of arrow button in Combobox. I want to run my swing application in XP without the look and feel of XP, and I ...





10. Problem with JComboBox background colour when using customer renderer    coderanch.com

Hi all, I've got a small problem in my GUI, which I cant seem to fix. Below is a screenshot of my GUI and I wanted all the box background colours to be pale pink, and all the ComboBoxes to look like the Pattern Supplied combo box (Pink unselected and white list items. The problem I have is that the Customer ...

11. JComboBox Background    forums.oracle.com