I would like to create a panel with a JTable and a permanent ScrollPaneOverview on the side of the table. I am having some problems and could not find an example on the DEMO examples.
I am trying to do the following:
- Code: Select all
JideScrollPane scrollpane = new JideScrollPane();
scrollpane.setViewportView(table);
scrollpane.setHorizontalScrollBarCoversWholeWidth(true);
scrollpane.setVerticalScrollBarCoversWholeHeight(true);
JPanel panel = new JPanel();
final ScrollPaneOverview scrollPaneOverview = new ScrollPaneOverview(scrollpane, panel);
scrollPaneOverview.setPreferredSize(new Dimension(100, 100));
panel.setPreferredSize(new Dimension(100, 100));
panel.add(scrollPaneOverview);
add(scrollpane, BorderLayout.CENTER);
add(panel, BorderLayout.WEST);
scrollPaneOverview.display();
Any tips or even an example would be appreciated.
Many Thanks.