Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java GUI 设计  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Applet的小问题(已经解决)
8261669





发贴: 41
积分: 0
于 2006-11-13 20:20 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
编写一个“准动画”应该程序,使矩形在显示区域的两边来回切换。试着不使用条件语句来改变矩形的位置。
这个是我写的:
import java.awt.*;
import java.applet.*;
public class FlipperApplet extends Applet
{
public void paint(Graphics g)
{
int appletWidth=getSize().width;

if(position)
{
g.drawRect(0,0,100,100);
}
else
{
g.drawRect(appletWidth-100,0,100,100);
}

posetion=!positon;
}
private boolean position=true;
}
里面没有写完的,不会,来判断来回切换的条件是什么啊?搞不懂?


8261669 edited on 2006-11-16 19:29

挖掘潜力
作者 Re:Applet的小问题 [Re:8261669]
cxp108





发贴: 363
积分: 12
于 2006-11-14 13:11 user profilesend a private message to usersend email to cxp108search all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
里面有没有的,不会,来判断来回切换的条件是什么啊?搞不懂?

LZ说什么呢???



作者 Re:Applet的小问题(已经解决) [Re:8261669]
8261669





发贴: 41
积分: 0
于 2006-11-16 19:30 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我已经自己做出来了,谢谢~



flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923