Java – how to put components on top of other components?

I have a jscrollpanel, including a large panel, which itself includes three internal panels I want to put a panel (for example) in a special place so that it can always be seen. I mean, the user can scroll to any desired place, but the panel is always on top of other components and will not move I tried to do this through jlayeredpane, but I couldn't What should I do?

Solution

There is a jlayeredpane example here, but the overlay, seen here, may attract attention It is not included in the traditional gallery

Also consider the example drawn on the jviewport of the scroll pane

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>