setComponentZOrder

Moves the specified component to the specified z-order index in the container. The z-order determines the order that components are painted; the component with the highest z-order paints first and the component with the lowest z-order paints last. Where components overlap, the component with the lower z-order paints over the component with the higher z-order.
将指定的组件移动到容器中指定的z顺序索引。 z次序确定组件被绘制的顺序;首先绘制Z次序最高的组件,最后绘制Z次序最低的组件。 在组件重叠的地方,具有较低z阶的组件涂覆在具有较高z阶的组件上。
If the component is a child of some other container, it is removed from that container before being added to this container. The important difference between this method and java.awt.Container.add(Component, int) is that this method doesn’t call removeNotify on the component while removing it from its previous container unless necessary and when allowed by the underlying native windowing system. This way, if the component has the keyboard focus, it maintains the focus when moved to the new position.
如果组件是某个其他容器的子对象,则在添加到此容器之前将其从该容器中删除。 此方法与java.awt.Container.add(Component,int)之间的重要区别在于,该方法不会在组件上调用removeNotify,而是从其先前的容器中删除它,除非必要时,并且在底层本机窗口系统允许的情况下。 这样,如果组件具有键盘焦点,则在移动到新位置时会保持焦点。
This property is guaranteed to apply only to lightweight non-Container components. This method changes layout-related information, and therefore, invalidates the component hierarchy.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值