当前位置: 技术问答>java相关
show()和setVisible(true)有什么区别?
来源: 互联网 发布时间:2015-08-20
本文导语: 如题 | show()激活窗口,使窗口处于前台。当时用show()时,就默认地先setVisible(true)了。 show public void show() Makes the Window visible. If the Window and/or its owner are not yet displayable, both are ma...
如题
|
show()激活窗口,使窗口处于前台。当时用show()时,就默认地先setVisible(true)了。
show
public void show()
Makes the Window visible. If the Window and/or its owner are not yet displayable, both are made displayable. The Window will be validated prior to being made visible. If the Window is already visible, this will bring the Window to the front
show
public void show()
Makes the Window visible. If the Window and/or its owner are not yet displayable, both are made displayable. The Window will be validated prior to being made visible. If the Window is already visible, this will bring the Window to the front
|
没区别,不过现在推荐用setVisible()