问题描述
我在徘徊自己哪个组件最适合在秋千中显示快速搜索结果。我想创建这样的东西,创建一个文本字段,用户可以在其中输入一些文本,在他进入期间我将改进后端快速搜索数据库,我想在文本框下面显示数据,他将能够浏览结果和输入结果将显示在表格中。所以我的问题是有没有任何组件已经有这个逻辑显示?
或者它不是,实现它的最佳方式是什么。
I'm wandering myself what component is the best for displaying fast search results in swing. I want to create something like this, make a text field where user can enter some text, during his entering I'll improve in back end fast search on database, and I want to show data bellow the text box, and he will be able to browse the results and on pres enter result will be displayed in table. So my question is is there any component which already have this logic for displaying?Or is it's not, what is the best way to implement that.
这个搜索将是ajax在网上给我的东西,相同的逻辑相同的外观和感觉,如果它可以在桌面应用程序上使用。
This search will be something what ajax gives me on web, same logic same look and feel, if it's possible on desktop application.
推荐答案
您是否正在寻找类似Java Swing的AutoComplete组件?
Are you looking for something like an AutoComplete component for Java Swing?
有这样一个组件。请参见此处对于JavaDoc。它有很多实用方法可以做各种事情,即从JList的内容中自动完成一个文本框。
SwingX has such a component. See here for the JavaDoc. It has a lot of utility methods to do various things, i.e. auto-completing a text box from the contents of a JList.
这篇关于快速搜索java swing应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!