文件名称:Desktop
- 所属分类:
- JSP源码/Java
- 资源属性:
- [MacOS]
- 上传时间:
- 2017-11-24
- 文件大小:
- 246kb
- 下载次数:
- 0次
- 提 供 者:
- 囚**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
package x12;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class Add extends Applet implements ActionListener
{
Label lblTwoNum = new Label ("请输入两个数字");
Label lblAdd = new Label ("此处显示答案");
TextField txtFirstNum = new TextField (2);
TextField txtSecNum = new TextField (2);
Button btnAdd = new Button ( "求和");
public void init()
{
add (lblTwoNum);
add (txtFirstNum);
add (txtSecNum);
add (btnAdd);
add (lblAdd);
this.resize(300,100);
btnAdd.addActionListener (this);
}
public void actionPerformed (ActionEvent e)
{
String firstNum = txtFirstNum.getText();
String secNum = txtSecNum.getText();
int add = Integer.parseInt(firstNum) + Integer.parseInt(secNum);
lblAdd.setText ("两数之和:"+ add);
}
}(sdadsasdasdsadsaasdadasdasd)
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class Add extends Applet implements ActionListener
{
Label lblTwoNum = new Label ("请输入两个数字");
Label lblAdd = new Label ("此处显示答案");
TextField txtFirstNum = new TextField (2);
TextField txtSecNum = new TextField (2);
Button btnAdd = new Button ( "求和");
public void init()
{
add (lblTwoNum);
add (txtFirstNum);
add (txtSecNum);
add (btnAdd);
add (lblAdd);
this.resize(300,100);
btnAdd.addActionListener (this);
}
public void actionPerformed (ActionEvent e)
{
String firstNum = txtFirstNum.getText();
String secNum = txtSecNum.getText();
int add = Integer.parseInt(firstNum) + Integer.parseInt(secNum);
lblAdd.setText ("两数之和:"+ add);
}
}(sdadsasdasdsadsaasdadasdasd)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
新建文本文档.txt | 16590 | 2017-11-24 |
java\.classpath | 301 | 2017-10-20 |
java\.project | 380 | 2017-10-20 |
java\.settings\org.eclipse.jdt.core.prefs | 598 | 2017-10-20 |
java\bin\java.policy.applet | 141 | 2017-10-20 |
java\bin\x6\Calculate.class | 1206 | 2017-10-20 |
java\bin\x6\J_Grid15.class | 3321 | 2017-10-20 |
java\bin\x6\L_Calender.class | 2686 | 2017-10-20 |
java\src\x6\Calculate.java | 1008 | 2017-10-20 |
java\src\x6\J_Grid15.java | 3673 | 2017-10-20 |
java\src\x6\L_Calender.java | 2670 | 2017-10-20 |
2017数字信号处理实验指导书.doc | 4465152 | 2017-11-01 |
java\bin\x6 | ||
java\src\x6 | ||
java\.settings | ||
java\bin | ||
java\src | ||
java |