Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4353808

Cannot start dragging scrollbar knob if parent JInternalFrame not activated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 1.4.0
    • 1.3.0
    • client-libs
    • 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)
      ======================================================================

            joutwatesunw Joshua Outwater (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: