JDK-6947671 : JComboBox under Gnome/Nimbus L&F doesn't paint focus indicator
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: solaris_11
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_nevada
  • CPU: generic
  • Submitted: 2010-04-27
  • Updated: 2012-03-22
  • Resolved: 2012-03-22
Related Reports
Duplicate :  
Description
When I run a simple Swing app with a JComboBox under Gnome/Nimbus, I don't see any indication of focus when the JComboBox has focus.  The attached screenshot, generated with the following code, shows a JComboBox with focus, but no focus indicator:

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

public class Fred {
    public static void main(String args[]) {
	int gap = 15;
	JButton b = new JButton("Hello");
	JComboBox combo = new JComboBox(new Object[] {"one", "two", "three"});

	JFrame frame = new JFrame();
	JPanel cont = new JPanel();
	cont.setBorder(BorderFactory.createEmptyBorder(gap, gap, gap, gap));
	cont.setLayout(new BorderLayout(gap, gap));
	cont.add(b, BorderLayout.CENTER);
	cont.add(combo, BorderLayout.SOUTH);

	frame.getContentPane().add(cont);

	frame.setLocationByPlatform(true);
	frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
	frame.pack();
	frame.setVisible(true);
    }
}

Comments
EVALUATION Nimbus paints focus correctly. For GTK there is another bug 7155887, so I'm closing this CR as a duplicate
22-03-2012