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

If you wrap a JTable in a JLayer, the cursor is moved to the last row of table by you press the page down key.

    XMLWordPrintable

Details

    • b10
    • x86
    • other

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0_102"
      Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 10 Pro

      A DESCRIPTION OF THE PROBLEM :
      This is because of a problem in javax.swing.plaf.basic.BasicTableUI. If you look around line ~427 you will see this code:

      Dimension delta = table.getParent().getSize();

      It should be as follows:

      Dimension delta = SwingUtilities.getUnwrappedParent(table).getSize();

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Run the code : http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7068740
      2. Select first row.
      3. Press the page down key.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      (25,0), (25,1), (25,2) row was selected.
      ACTUAL -
      (99, 0), (99, 1), (99, 2) row was selected.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Issue Links

          Activity

            People

              psadhukhan Prasanta Sadhukhan
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: