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

Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container

XMLWordPrintable

    • b68
    • x86
    • windows_xp

      See details and code sample in the 6526631 CR.
      Fix the source code as shown below:

      - ComponentOrientation orientation = jTree1.getComponentOrientation();
      - if (orientation.isLeftToRight()) {
      - jTree1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
      - } else {
      - jTree1.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
      - }

      + ComponentOrientation orientation = jTree1.getComponentOrientation();
      + if (orientation.isLeftToRight()) {
      + jScrollPane1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
      + } else {
      + jScrollPane1.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
      + }

            malenkov Sergey Malenkov (Inactive)
            malenkov Sergey Malenkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: