I want to have a GUI application which would contain multiple tabs, each with its own Table. I would like to include a search box below the tabs which would filter the currently selected tab. How can this dynamic behaviour be achieved?
Asked
Active
Viewed 270 times
1
-
3question whats happens with value in "searchbox" in case that in "searchbox" was typed any value and you'll switch to another tab ??? – mKorbel Sep 11 '12 at 08:04
-
where exactly is the problem (except a little logic, as @mKorbel noted)? – kleopatra Sep 11 '12 at 08:06
1 Answers
3
figure one you can to share
RowSorter/RowFilter
for allJTables
in current JVM instancefiltering works for all
JTables
notice there could be performance issue in the case that there is/are JTable(s) contains bunch of rows
quite possible for
JTables
that contains a few (limited number of) rows together
determine (from arrays of tabs) visible tab, visible JComponents(or have to look at SwingUtilities), then remove
RowSorter/RowFilter
from allJTables
instances and then to addRowSorter/RowFilter
to the visible an focusableJTable
JTextField
forRowSorter/RowFilter
should be crated only once times