将对象放在其他对象之上

时间:2022-10-01 11:58:57

i have this jpanel, which at first i have under my other panels, but then after i use the panel, then it goes in front, and then i cannot display the text on the other panels, how do i force these other panels on top of the first panel .. ?? any suggestions are welcome..

我有这个jpanel,起初我已经在我的其他面板下,但是在我使用面板之后,它就在前面,然后我无法在其他面板上显示文本,我如何强制这些其他面板在顶部第一个小组.. ??欢迎任何建议..

to the comments: well, i don't use a layout manager, and its when i set it to visible=false and then makes another object on top, then when i set visible=true then i cannot read the labels on the now visible object.

评论:好吧,我不使用布局管理器,当我将它设置为visible = false然后将另一个对象放在顶部时,然后当我设置visible = true然后我无法读取现在可见的标签宾语。

1 个解决方案

#1


0  

you can experiment with setComponentZOrder(Component comp, int index)

你可以尝试使用setComponentZOrder(Component comp,int index)

#1


0  

you can experiment with setComponentZOrder(Component comp, int index)

你可以尝试使用setComponentZOrder(Component comp,int index)