01: package snow.sortabletable;
02:
03: import java.awt.BorderLayout;
04: import javax.swing.*;
05:
06: public final class SortableTableUtils {
07: private SortableTableUtils() {
08: }
09:
10: /** With an easy search bar, not the multisearch panel.
11: */
12: public static JPanel createTableWithSearchBar(
13: SortableTableModel stm, JTable table) {
14: JPanel p = new JPanel(new BorderLayout(0, 0));
15: p.add(new JScrollPane(table), BorderLayout.CENTER);
16:
17: AdvancedSearchPanel asp = new AdvancedSearchPanel("Filter: ",
18: null, stm, false);
19: p.add(asp, BorderLayout.NORTH);
20:
21: return p;
22: }
23: }
|