-
Bug
-
Resolution: Fixed
-
P5
-
1.3.0
-
beta
-
x86
-
windows_98
Name: skT45625 Date: 07/17/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
In the attached test case, there is an internal frame
that contains a scroll pane. Just like in native
Windows applications, it should be possible to click
on one of the scrollbar knobs and immediately start
dragging it even if the internal frame was not
activated/selected before the click occurred.
At the moment, two mouse clicks are required:
one to activate the internal frame and another
(separate) one to move the scrollbar knob.
This is annoying.
(Using the arrow buttons works, though.)
--
import java.awt.*;
import javax.swing.*;
public class JIFScrollBug extends JFrame {
public JIFScrollBug() {
super("JIFScrollBug");
JDesktopPane dp = new JDesktopPane();
JInternalFrame intFrm1 = new JInternalFrame();
JTextArea ta = new JTextArea(80, 160);
ta.setText("Test\nTest\nTest\n");
JScrollPane scp = new JScrollPane(ta);
intFrm1.setContentPane(scp);
intFrm1.setLocation(new Point(32, 32));
intFrm1.setSize(new Dimension(256, 300));
dp.add(intFrm1);
JInternalFrame intFrm2 = new JInternalFrame();
intFrm2.setLocation(new Point(320, 32));
intFrm2.setSize(new Dimension(256, 300));
dp.add(intFrm2);
setContentPane(dp);
setSize(new Dimension(608, 384));
show();
setLocation((getToolkit().getScreenSize().width - getWidth()) / 2,
((getToolkit().getScreenSize().height) - getHeight()) / 2);
intFrm1.setVisible(true);
intFrm2.setVisible(true);
}
public static void main(String[] args) {
new JIFScrollBug();
}
}
(Review ID: 107245)
======================================================================