package util;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.scene.control.ComboBox;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
/**
*
* @author
* 监听ComboBox,自动完成搜索功能
* @param <T>
*/
public class AutoCompleteComboBoxListener<T> implements EventHandler<KeyEvent> {
private ComboBox comboBox;
private StringBuilder sb;
private ObservableList<T> data;
private boolean moveCaretToPos = false;
private int caretPo
comboBox 自动完成搜索功能
最新推荐文章于 2021-02-24 22:46:08 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)