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

您没有登录

» Java开发网 » Java SE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 请大家帮忙!一个猜数的程序
wangyabing





发贴: 18
积分: 0
于 2006-01-01 21:13 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.awt.event.*;
import javax.swing.*;
public class gussFieldTest
{
public static void main(String[] args)
{
KeyFrame frame = new KeyFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
}
}
class KeyFrame extends JFrame
{
public KeyFrame()
{
setTitle("gussFieldTest ");
setSize(WIDTH, HEIGHT);

// 将panel加入到frame
KeyPanel panel = new KeyPanel();
Container contentPane = getContentPane();
contentPane.add(panel);
}

public static final int WIDTH = 300;
public static final int HEIGHT = 200;
}
class KeyPanel extends JPanel implements ActionListener
{
public KeyPanel()
{
//注册监听器
addKeyListener(this);
}

public void init()
{
contentPane.setLayout(new FlowLayout());
setBackground(new Color(105,105,105));
Jable lb1=new Jlable("请输入你想输入的数据:",Jlable,CENTTER);
contentPane.add(lb1);
JLable lb2=new Jlable("输出结果为:",Jlable,CENTTER);
contentPane.add(lb2);
JTextField gussText1=new JTextField(10);
contentPane.add(gussText1);
JTextField gussText2=new JTextField(10);
contentPane.add(gussText2);
}
public void actionPerformde(ActionEvent e)
{
String str;
str=gussText1.getText();
if(str=gussstae)
{
gussText2.setText(str);

}
}
}


why edited on 2006-01-01 21:49

作者 Re:请大家帮忙!一个猜数的程序 [Re:wangyabing]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2006-01-01 21:54 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
请尽量使用准确的文字描述作为标题

Please use [code ] tag and check "Disable Smileys" when posting source code.

原來的标题:
真的是太菜了请大家帮忙呀!一个猜数的程序

 
Please tell us what your question is.
We don't want to guess -- btw, please use proper class name: it is "Guess", not "guss"
GuessFieldTest

Please double-check your source code first.
Look...
Jable lb1=new Jlable("请输入你想输入的数据:",Jlable,CENTTER);
contentPane.add(lb1);
JLable lb2=new Jlable("输出结果为:",Jlable,CENTTER);
簡直恐怖!

No one will dare to help if you continue to dump garbage like this.
假如閣下也不尊重自己的提問,自然無人願意費神.
那麼,敝人會把帖子删除--這是最後一次警告.


why edited on 2006-01-02 03:29

作者 Re:请大家帮忙!一个猜数的程序 [Re:wangyabing]
ranchgirl



版主


发贴: 801
积分: 132
于 2006-01-02 02:05 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
Do you even have a question??? If you don't have a question, how could somebody come out an answer??? Angry

gongshi edited on 2006-01-02 03:56

作者 Re:请大家帮忙!一个猜数的程序 [Re:wangyabing]
DeadPoet





发贴: 5
积分: 0
于 2006-01-04 11:52 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
这是什么烂代码啊,自己先检查了再贴出来啊,不要只管丢给别人,自己都不负责任好不好


作者 Re:请大家帮忙!一个猜数的程序 [Re:wangyabing]
Ginakind





发贴: 5
积分: 0
于 2006-01-08 18:03 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
Question晕!!!


作者 Re:请大家帮忙!一个猜数的程序 [Re:wangyabing]
Ginakind





发贴: 5
积分: 0
于 2006-01-08 18:05 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
Jable lb1=new Jlable("请输入你想输入的数据:",Jlable,CENTTER);

连拼写都错,请注意了。
程序的调试很重要,但是写的时候也要自己检查清楚




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-2020 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号
客服电话 0592-8750026    客服信箱 714923@qq.com    客服QQ 714923