GlazedListsのコンボボックスにオートコンプリート機能を使用しています。それはかなり便利です。私もnibusL&Fを使っています。ただし、JCombobox.setBackground(Color)は無視されます。ニンバスを使用して背景色をたとえば赤に強制する方法はありますか?
サンプルコード:
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
final JFrame frame = new JFrame();
JComboBox cbox = new JComboBox();
String[] strs = {"Nowarro", "Klamat", "Den", "NKR"};
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (Throwable e1) {
e1.printStackTrace();
}
AutoCompleteSupport.install(cbox, GlazedLists.eventList(Arrays.asList(strs)));
cbox.setBackground(Color.RED); // NO EFFECT!!!
frame.getContentPane().add(cbox);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}