609N/A/*
609N/A * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
609N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
609N/A *
609N/A * This code is free software; you can redistribute it and/or modify it
609N/A * under the terms of the GNU General Public License version 2 only, as
609N/A * published by the Free Software Foundation.
609N/A *
609N/A * This code is distributed in the hope that it will be useful, but WITHOUT
609N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
609N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
609N/A * version 2 for more details (a copy is included in the LICENSE file that
609N/A * accompanied this code).
609N/A *
609N/A * You should have received a copy of the GNU General Public License version
609N/A * 2 along with this work; if not, write to the Free Software Foundation,
609N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
609N/A *
609N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
609N/A * or visit www.oracle.com if you need additional information or have any
609N/A * questions.
609N/A */
609N/A
609N/A/*
609N/A * @test
609N/A * @bug 6690791
609N/A * @summary Checks that there is no ClassCastException
609N/A * in MenuSelectionManager.processMouseEvent()
609N/A * @author Mikhail Lapshin
609N/A * @run main bug6690791
609N/A */
import javax.swing.*;
import java.awt.event.MouseEvent;
public class bug6690791 {
public static void main(String[] args) throws Exception {
MouseEvent me = new MouseEvent(new JLabel(), MouseEvent.MOUSE_CLICKED,
System.currentTimeMillis(), MouseEvent.ALT_MASK,
10, 10, 100, 100, 1, false, MouseEvent.BUTTON1);
me.setSource(new Object());
MenuSelectionManager.defaultManager().processMouseEvent(me);
}
}