I have tried several options but I only get error messages, I appreciate the support on how to insert the UITimer API.
final DefaultListModel<String> lmArticulos = new DefaultListModel<>();
AutoCompleteTextField atArticulo = new AutoCompleteTextField(lmArticulos) {
@Override
protected boolean filter(String text) {
UITimer timer = new UITimer(new Runnable() {
public void run() {
}
});
timer.schedule(1000, true, fmArticulo);
if (text.length() == 0) {
return false;
}
ArrayList l = dT.leeInformacionRegistro(text, ARTICULO_LEE_NOMBRE_REGISTRO);
if (l.isEmpty() || l.size() == 0) {
return false;
}
lmArticulos.removeAll();
Vector vArticulo = new Vector();
for (int i = 0; i < l.size(); i++) {
Map<String, String> d = (Map<String, String>) l.get(i);
lmArticulos.addItem(d.get("art_nombre"));
Articulo aRt = new Articulo();
aRt.setArticulo((String) d.get("art_articulo_id"));
aRt.setNombre((String) d.get("art_nombre"));
aRt.setTamano((String) d.get("art_tamano"));
vArticulo.addElement(aRt);
}
dT.setTemporal(vArticulo);
return true;
}
};