Thanks for reply
but this what i want to do:
When a key is pressed in an editable combobox, I want the popup menu of the jcombobox to appear automatically, and get the text written in it, but when I changed the icon of the arrow button,the icon changed but the popup menu doesn't appear when key is pressed.
When I tried to do this in Windows look and feel, it worked fine without any problems, but in Synth look and feel, it didn't work. I searched for two days but I couldn't solve the problem.
I tried to use document listener but nothing changed or i didnt use it correctly
I hope my problem is clarified this time
JTextField editor;
.
.
.
editor = (JTextField) jComboBox1.getEditor().getEditorComponent();
\\
editor.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
if (jComboBox1.isDisplayable())
{
jComboBox1.setPopupVisible(true);
}
System.out.println(editor.getText());
}
});
\\ change arrowbutton icon
jComboBox1.setUI(new SynthComboBoxUI() {
@Override
protected JButton createArrowButton() {
JButton btn = new JButton();
btn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/error3.png")));
return btn;
}
});