-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0
-
None
-
sparc
-
solaris_2.5
JScrollBar does honor keyboard bindings, but it is backwards regarding the left/right arrow buttons. It does the correct thing for HOME/END/PAGEUP/PAGEDOWN buttons. Tab and shift-tab do nothing. If you have a horizontal scrollbar and hit the LEFT button, the knob moves right. It behaves incorrectly on Metal and Windows. In behaves incorrectly on releases 1.3 and 1.4. It behaves correctly with the up/down buttons on a vertical scrollbar.
Here's a little sample program which exhibits the behavior:
import java.awt.*;
import javax.swing.*;
public class JFrame1 extends javax.swing.JFrame
{
public JFrame1(){
getContentPane().setLayout(null);
setSize(405,305);
setVisible(false);
JScrollBar1.setRequestFocusEnabled(true);
getContentPane().add(JScrollBar1);
JScrollBar1.setBounds(10,10,236,39);
JScrollBar1.setOrientation(Adjustable.HORIZONTAL);
}
static public void main(String args[]){
(new JFrame1()).setVisible(true);
}
javax.swing.JScrollBar JScrollBar1 = new javax.swing.JScrollBar();
}
Here's a little sample program which exhibits the behavior:
import java.awt.*;
import javax.swing.*;
public class JFrame1 extends javax.swing.JFrame
{
public JFrame1(){
getContentPane().setLayout(null);
setSize(405,305);
setVisible(false);
JScrollBar1.setRequestFocusEnabled(true);
getContentPane().add(JScrollBar1);
JScrollBar1.setBounds(10,10,236,39);
JScrollBar1.setOrientation(Adjustable.HORIZONTAL);
}
static public void main(String args[]){
(new JFrame1()).setVisible(true);
}
javax.swing.JScrollBar JScrollBar1 = new javax.swing.JScrollBar();
}
- duplicates
-
JDK-4456073 JScrollbar (Horizontal) Scrolls in oppossite direction using arrow keys
-
- Closed
-