Test6526631.java revision 2362
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * This code is free software; you can redistribute it and/or modify it
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley * under the terms of the GNU General Public License version 2 only, as
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley * published by the Free Software Foundation.
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley * This code is distributed in the hope that it will be useful, but WITHOUT
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley * version 2 for more details (a copy is included in the LICENSE file that
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * accompanied this code).
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * You should have received a copy of the GNU General Public License version
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * 2 along with this work; if not, write to the Free Software Foundation,
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * or visit www.oracle.com if you need additional information or have any
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * questions.
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * @bug 6526631
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * @summary Resizes right-oriented scroll pane
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne * @author Sergey Malenkov
67c044a145fa1987d77d3f609876a839b0240ed0Jason Browne * @library ..
67c044a145fa1987d77d3f609876a839b0240ed0Jason Browne public static void main(String[] args) throws Throwable {
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne this.pane = new JScrollPane(new JTextArea(ROWS, COLS));
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne this.pane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
67c044a145fa1987d77d3f609876a839b0240ed0Jason Browne public void validateFirst() {
67c044a145fa1987d77d3f609876a839b0240ed0Jason Browne public void validateSecond() {
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne public void validateThird() {
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne JScrollBar scroller = this.pane.getHorizontalScrollBar();
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne if (!scroller.getComponentOrientation().equals(ComponentOrientation.RIGHT_TO_LEFT)) {
433f48af5998e03a03440dce699c9dcfd7b86375Jason Browne throw new Error("unexpected component orientation");