2872N/A/*
2872N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2872N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2872N/A *
2872N/A * This code is free software; you can redistribute it and/or modify it
2872N/A * under the terms of the GNU General Public License version 2 only, as
2872N/A * published by the Free Software Foundation.
2872N/A *
2872N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2872N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2872N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2872N/A * version 2 for more details (a copy is included in the LICENSE file that
2872N/A * accompanied this code).
2872N/A *
2872N/A * You should have received a copy of the GNU General Public License version
2872N/A * 2 along with this work; if not, write to the Free Software Foundation,
2872N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2872N/A *
2872N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2872N/A * or visit www.oracle.com if you need additional information or have any
2872N/A * questions.
2872N/A */
2872N/A
2872N/A/* @test
2872N/A @bug 6986385
2872N/A @summary JLayer should implement accessible interface
2872N/A @author Alexander Potochkin
2872N/A @run main bug6986385
2872N/A*/
2872N/A
2872N/Aimport javax.swing.*;
2872N/Aimport javax.accessibility.AccessibleContext;
2872N/Aimport javax.accessibility.AccessibleRole;
2872N/A
2872N/Apublic class bug6986385 {
2872N/A
2872N/A public static void main(String... args) throws Exception {
2872N/A JLayer l = new JLayer();
2872N/A AccessibleContext acc = l.getAccessibleContext();
2872N/A if (acc == null) {
2872N/A throw new RuntimeException("JLayer's AccessibleContext is null");
2872N/A }
2872N/A if (acc.getAccessibleRole() != AccessibleRole.PANEL) {
2872N/A throw new RuntimeException("JLayer's AccessibleRole must be PANEL");
2872N/A }
2872N/A }
2872N/A}