自动完成搜索JTextField中的Java [英] Auto Complete Search Jtextfield Java

查看:212
本文介绍了自动完成搜索JTextField中的Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能帮助我这个问题,我有一个JTable,我想搜索具有的JTextField其中的数据,作为用户的类型,建议出现在下拉列表,从中选择,那么用户选择它,结果显示在表中。

can anyone help me with this , I have a jtable and I want to search for the data in it with jtextfield , as the user types, suggestions appears in a drop down list and select from it , then the user select it and the results appears in the table.

推荐答案

这是可能的两种方式。

1),最简单的不实施自动完成的JTextField
  - JTable中已经实施的在本教程中排序和筛选 code例如

1) easiest without implement for autocomplete JTextField, - JTable has implemented Sorting and Filtering code example in the tutorial

2)实施自动完成的JComboBox / JTextField中(读整个线程,因为有一个在SwingX实现最另类外观极好)和 JTable中设置过滤

2) by implement AutoComplete JComboBox / JTextField (read whole thread because there is most excelent alternative implemented in the SwingX) and for JTable to set Filtering

这篇关于自动完成搜索JTextField中的Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆