佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 860|回复: 5

who knw java??? pls help!!!urgent!!!!

[复制链接]
发表于 27-3-2008 12:13 PM | 显示全部楼层 |阅读模式
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
回复

使用道具 举报


ADVERTISEMENT

发表于 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都应该可以用吧~
回复

使用道具 举报

Follow Us
您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 1-1-2026 03:30 PM , Processed in 0.119674 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表