-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
solaris_11
-
generic
-
solaris_nevada
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);
}
}
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);
}
}
- duplicates
-
JDK-7155887 ComboBox does not display focus outline in GTK L&F
- Resolved