B
bruce
I am trying to get Scrollbars to work. With the following code, a
horizontal bar appears and the slide works. But the data on the page
does not scroll.
setLayout(new BorderLayout());
JScrollBar hbar = new JScrollBar(
JScrollBar.HORIZONTAL, 30, 20, 0, 300);
hbar.setUnitIncrement(2);
hbar.addAdjustmentListener(new MyAdjustmentListener());
add(hbar, BorderLayout.SOUTH);
class MyAdjustmentListener implements AdjustmentListener {
public void adjustmentValueChanged(AdjustmentEvent e) {
repaint();
}
Thanks for the help....
Bruce
horizontal bar appears and the slide works. But the data on the page
does not scroll.
setLayout(new BorderLayout());
JScrollBar hbar = new JScrollBar(
JScrollBar.HORIZONTAL, 30, 20, 0, 300);
hbar.setUnitIncrement(2);
hbar.addAdjustmentListener(new MyAdjustmentListener());
add(hbar, BorderLayout.SOUTH);
class MyAdjustmentListener implements AdjustmentListener {
public void adjustmentValueChanged(AdjustmentEvent e) {
repaint();
}
Thanks for the help....
Bruce