You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrey Pavlenko (JIRA)" <ji...@apache.org> on 2008/01/10 13:25:34 UTC

[jira] Updated: (HARMONY-5060) [classlib][swing] Can not move window showing popupMenu

     [ https://issues.apache.org/jira/browse/HARMONY-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Pavlenko updated HARMONY-5060:
-------------------------------------

    Attachment:     (was: HARMONY-5060-MouseGrab.patch)

> [classlib][swing] Can not move window showing popupMenu
> -------------------------------------------------------
>
>                 Key: HARMONY-5060
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5060
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Win32
>            Reporter: Chunrong Lai
>            Assignee: Andrey Pavlenko
>
>  Below is the simple reproducer.
>  I only succeed in the first time when I try to move the window with the PopupMenu showing. After that I can not move the window if the popup menu is shown. After some tracing I see that the window can be moved because the WM_CAPTURECHANGED event is generated and handled. But generally there are only MOUSE_PRESSED events instead of the WM_CAPTURECHANGED event.
> import java.awt.*;
> import java.awt.event.*;
> import javax.swing.*;
> public class PopupMenuDemo extends JPanel {
>     public PopupMenuDemo() {
>         super(new BorderLayout());
>         String[] theStrings = { "First", "Second", "Third", "Fourth" };
>         JComboBox theList = new JComboBox(theStrings);
>         add(theList, BorderLayout.PAGE_START);
>     }
>     public static void main(String[] args) {
>         JFrame frame = new JFrame("PopupMenuDemo");
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         JComponent newContentPane = new PopupMenuDemo();
>         newContentPane.setOpaque(true); //content panes must be opaque
>         frame.setContentPane(newContentPane);
>         frame.setBounds(100, 100, 200, 50);
>         //Display the window.
>         frame.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.