|
查看: 862|回复: 5
|
who knw java??? pls help!!!urgent!!!!
[复制链接]
|
|
|
now i got 2 JFrame.
the 1st JFrame i got 1 JButton.
when i click that button it will link to 2nd JFrame or 2nd JFrame will appear...
but the 1st JFrame also at there....
how do i make the 1st JFrame disappear when the 2nd JFrame appaer ....???????
pls.............HELP>>>>>>>
thx thx thx thx |
|
|
|
|
|
|
|
|
|
|
发表于 27-3-2008 12:20 PM
|
显示全部楼层
|
frame1.setVisible(false); |
|
|
|
|
|
|
|
|
|
|
发表于 27-3-2008 01:28 PM
|
显示全部楼层
回复 1# loychang 的帖子
如果用NULL LAYOUT,111的答案就可以了。
如果用CARD LAYOUT,换卡就可以了。
如果不是,就请
removeComponent
addComponent
pack |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 28-3-2008 11:17 AM
|
显示全部楼层
i am sori
still got other way????to solve this problem
is frame1.set visible(false).. then the frame1 wont appear so how do i click the button...
and i not use the cardlayout soli de
anyway thx a lot for ur help |
|
|
|
|
|
|
|
|
|
|
发表于 28-3-2008 12:51 PM
|
显示全部楼层
Well friend, it's easier to just post your code and let the experts see it and correct it for you
Also, 这是中文论坛,请尽量用中文,thanks  |
|
|
|
|
|
|
|
|
|
|
发表于 1-4-2008 09:27 AM
|
显示全部楼层
是咯...没CODE帮不到你~
removeComponent
addComponent
不一定要在CARD,只要是PANEL都应该可以用吧~ |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|