简体   繁体   English

如何将JFrame带到它后面的窗口后面?

[英]How to bring JFrame to the back of the window behind it?

I want to make a JFrame with the drawn shadow. 我想用绘制的阴影制作一个JFrame。 I made a undecorated window and made a background with shadow(grey) and empty part(green),and it can be dragged. 我制作了一个未装饰的窗口,并制作了带有阴影(灰色)和空白部分(绿色)的背景,可以将其拖动。

The problem is,when I try to drag the shadow or the empty part,the frame can also be dragged! 问题是,当我尝试拖动阴影或空白部分时,也可以拖动框架! I want to bring the window under the window(Another application) that was under it,just like I click on the window. 我想将窗口置于其下的窗口(另一个应用程序)下,就像单击窗口一样。

I tried setBack(),but it just put it under every window,not the back one. 我尝试了setBack(),但它只是将其放在每个窗口下,而不是后一个窗口下。

How to click through the window? 如何通过窗口单击?

I am unable to understand your question clearly. 我无法清楚地理解您的问题。 In case want a frame within a frame, then opt for JInternalFrame class. 如果要在一个框架中添加一个框架,则选择JInternalFrame类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM