开发者

How can I pass mouse events on a translucent JWindow to the JFrame underneath?

开发者 https://www.devze.com 2023-03-04 17:19 出处:网络
I am creating a Firefox style drag and drop ta开发者_StackOverflow中文版bbed pane based on this example. To implement the scaled tab images as you drag I am using a JWindow. I want the image to be vis

I am creating a Firefox style drag and drop ta开发者_StackOverflow中文版bbed pane based on this example. To implement the scaled tab images as you drag I am using a JWindow. I want the image to be visible when you drag anywhere on the desktop so I have to use a heavyweight component instead of drawing on the glass pane like most examples I have seen.

However, when I drag the JWindow captures mouse events and interferes with drag and drop listeners that are on the JFrame below. Is there a way I can get the JWindow to resdispatch the mouse events so they activate the drag listeners on the JFrame below (like would happen if I did use the glass pane)?


Check out this good article "A well-behaved GlassPane" which may have some ideas for doing what you wish.

0

精彩评论

暂无评论...
验证码 换一张
取 消