I can change the item's focus by pressing the arrow keys on the keyboard or by moving the mouse over it. Is there a programmatic way to move the focus around the items?
You can simply set the selected item. Optionally, you can show the dropdown list:
comboBox.requestFocus();
comboBox.showPopup();
comboBox.setSelectedIndex(selectedIndex);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.