import java.awt.Button;
import java.awt.Color;
import java.awt.Font;
import java.awt.Frame;
import java.awt.Label;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.List;
public class myFrame extends Frame
{
String s=null;
TextField tf1,tf2,tf3,tf4;
public myFrame()
{
setBackground(Color.black); //窗口设置
setBounds(200, 100,800 ,500);
this.setTitle("复数—计算器");
this.setLayout(null);
this.setResizable(false);
this.addWindowListener(new Windows());
Button b7=new Button("7"); //按键设置
b7.setBounds(50, 200, 100, 50);
b7.setVisible(true);
this.add(b7);
b7.setFont(new Font("隶书",Font.BOLD,35));
b7.addActionListener(new Monitor2());
setVisible(true);
Button b8=new Button("8");
b8.setBounds(200, 200, 100, 50);
b8.setVisible(true);
this.add(b8);
b8.setFont(new Font("隶书",Font.BOLD,35));
b8.addActionListener(new Monitor2());
setVisible(true);
Button b9=new Button("9");
b9.setBounds(350, 200, 100, 50);
b9.setVisible(true);
this.add(b9);
b9.setFont(new Font("隶书",Font.BOLD,35));
b9.addActionListener(new Monitor2());
setVisible(true);
Button bj=new Button("+");
bj.setBounds(550, 200, 100, 50);
bj.setVisible(true);
this.add(bj);
bj.setFont(new Font("隶书",Font.BOLD,35));
bj.addActionListener(new Monitor2());
setVisible(true);
Button b4=new Button("4");
b4.setBounds(50, 275, 100, 50);
b4.setVisible(true);
this.add(b4);
b4.setFont(new Font("隶书",Font.BOLD,35));
b4.addActionListener(new Monitor2());
setVisible(true);
Button b5=new Button("5");
b5.setBounds(200, 275, 100, 50);
b5.setVisible(true);
this.add(b5);
b5.setFont(new Font("隶书",Font.BOLD,35));
b5.addActionListener(new Monitor2());
setVisible(true);
Button b6=new Button("6");
b6.setBounds(350, 275, 100, 50);
b6.setVisible(true);
this.add(b6);
b6.setFont(new Font("隶书",Font.BOLD,35));
b6.addActionListener(new Monitor2());
setVisible(true);
Button br=new Button("-");
br.setBounds(550, 275, 100, 50);
br.setVisible(true);
this.add(br);
br.setFont(new Font("隶书",Font.BOLD,35));
br.addActionListener(new Monitor2());
setVisible(true);
Button b1=new Button("1");
b1.setBounds(50, 350, 100, 50);
b1.setVisible(true);
this.add(b1);
b1.setFont(new Font("隶书",Font.BOLD,35));
b1.addActionListener(new Monitor2());
setVisible(true);
Button b2=new Button("2");
b2.setBounds(200,350, 100, 50);
b2.setVisible(true);
this.add(b2);
b2.setFont(new Font("隶书",Font.BOLD,35));
b2.addActionListener(new Monitor2());
setVisible(true);
Button b3=new Button("3");
b3.setBounds(350, 350, 100, 50);
b3.setVisible(true);
this.add(b3);
b3.setFont(new Font("隶书",Font.BOLD,35));
b3.addActionListener(new Monitor2());
setVisible(true);
Button bc=new Button("*");
bc.setBounds(550, 350, 100, 50);
bc.setVisible(true);
this.add(bc);
bc.setFont(new Font("隶书",Font.BOLD,35));
bc.addActionListener(new Monitor2());
setVisible(true);
Button bn=new Button("0");
bn.setBounds(50, 425, 100, 50);
bn.setVisible(true);
this.add(bn);
bn.setFont(new Font("隶书",Font.BOLD,35));
bn.addActionListener(new Monitor2());
setVisible(true);
Button bd=new Button(".");
bd.setBounds(200,425, 100, 50);
bd.setVisible(true);
this.add(bd);
bd.setFont(new Font("隶书",Font.BOLD,30));
bd.addActionListener(new Monitor2());
setVisible(true);
Button bi=new Button("i");
bi.setBounds(350,425, 100, 50);
bi.setVisible(true);
this.add(bi);
bi.setFont(new Font("隶书",Font.BOLD,35));
bi.addActionListener(new Monitor2());
setVisible(true);
Button bkz=new Button("(");
bkz.setBounds(550,425, 100, 50);
bkz.setVisible(true);
this.add(bkz);
bkz.setFont(new Font("隶书",Font.BOLD,35));
bkz.addActionListener(new Monitor2());
setVisible(true);
Button bky=new Button(")");
bky.setBounds(675,425, 100, 50);
bky.setVisible(true);
this.add(bky);
bky.setFont(new Font("隶书",Font.BOLD,35));
bky.addActionListener(new Monitor2());
setVisible(true);
Button bde=new Button("=");
bde.setBounds(675,300, 100, 100);
bde.setVisible(true);
this.add(bde);
bde.setFont(new Font("隶书",Font.BOLD,35));
setVisible(true);
bde.addActionListener(new Monitor());
Button bAC=new Button("AC");
bAC.setBounds(675,200, 100, 30);
bAC.setVisible(true);
this.add(bAC);
bAC.setFont(new Font("隶书",Font.BOLD,35));
setVisible(true);
bAC.addActionListener(new Monitor2());
Button bDEL=new Button("DEL");
bDEL.setBounds(675,250, 100, 30);
bDEL.setVisible(true);
this.add(bDEL);
bDEL.setFont(new Font("隶书",Font.BOLD,35));
setVisible(true);
bDEL.addActionListener(new Monitor2());
Button bclear=new Button("clear");
bclear.setBounds(735,140, 40, 30);
bclear.setVisible(true);
this.add(bclear);
// bclear.setFont(new Font("隶书",Font.BOLD,35));
setVisible(true);
bclear.addActionListener(new Monitor2());
Label lb=new Label("结果为:"); //标签设置
lb.setBounds(50,125,125,50);
lb.setBackground(Color.white);
this.add(lb);
lb.setFont(new Font("隶书",Font.BOLD,35));
setVisible(true);
tf1=new TextField (); //文本框设置
tf1.setBounds(50, 50, 700, 50);
tf1.setVisible(true);
add(tf1);
tf1.setFont(new Font("隶书",Font.BOLD,35));
tf2=new TextField ();
tf2.setBounds(400, 125, 325, 50);
tf2.setVisible(true);
tf2.setFont(new Font("隶书",Font.BOLD,35));
add(tf2);
tf3=new TextField ();
tf3.setFont(new Font("隶书",Font.BOLD,35));
tf3=new TextField ();
tf3.setBounds(185, 135, 80, 30);
tf3.setVisible(true);
add(tf3);
tf3.setFont(new Font("隶书",Font.BOLD,15));
tf4=new TextField ();
tf4=new TextField ();
tf4.setBounds(275, 135, 110, 30);
tf4.setVisible(true);
add(tf4);
tf4.setFont(new Font("隶书",Font.BOLD,15));
}
public static void main(String[] args) //主方法
{
//String s = "(-4-i)+ (-5-8i)+(5-34i)*(-7-9i)+(8+9i)+(-1)+(-9i)";
myFrame mmm=new myFrame();
}
public void set(String str,String angle,String length) //设置字符串
{
tf2.setText(str);
tf3.setText(angle+"°");
tf4.setText(length+"");
}
public S
没有合适的资源?快使用搜索试试~ 我知道了~
fushu.rar_复数计算器
共95个文件
class:36个
java:18个
classpath:11个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 169 浏览量
2022-09-20
18:37:34
上传
评论
收藏 166KB RAR 举报
温馨提示
基于awt的界面复数计算器 基于awt的界面复数计算器
资源详情
资源评论
资源推荐
收起资源包目录
fushu.rar (95个子文件)
复数计算器
fuShu0.8完全版
bin
myFrame$Windows.class 593B
Count.class 6KB
myFrame$Monitor2.class 1KB
myFrame.class 5KB
myFrame$Monitor.class 1018B
复数-计算器.jar 8KB
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 6KB
myFrame.java 8KB
.project 384B
.classpath 301B
fuShu0.6
bin
Windows.class 464B
Count.class 6KB
myFrame.class 4KB
myFrame$Monitor.class 1018B
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 6KB
myFrame.java 6KB
.project 384B
.classpath 301B
fuShu0.9终结版2
bin
myFrame$Windows.class 593B
Count.class 7KB
myFrame$Monitor2.class 1KB
myFrame.class 5KB
myFrame$Monitor.class 1KB
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 7KB
myFrame.java 9KB
复数—计算器.jar 10KB
.project 384B
闪烁的文字.jar 3KB
.classpath 301B
FuShu0.1
bin
Count.class 3KB
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 3KB
.project 381B
.classpath 301B
fuShu0.4
bin
Count.class 6KB
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 6KB
.project 384B
.classpath 301B
fuShu0.5
bin
Windows.class 464B
Count.class 6KB
myFrame.class 3KB
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 6KB
myFrame.java 5KB
.project 384B
.classpath 301B
fuShu0.7
bin
myFrame$Windows.class 593B
Count.class 6KB
myFrame$Monitor2.class 1KB
myFrame.class 4KB
myFrame$Monitor.class 1018B
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 6KB
myFrame.java 8KB
.project 384B
fuShu.jar 8KB
.classpath 301B
fuShu0.3
bin
Count.class 6KB
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 6KB
.project 384B
.classpath 301B
fuShu0.2
bin
Count.class 6KB
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 6KB
.project 384B
.classpath 301B
fuShu0.9终结版1
bin
myFrame$Windows.class 593B
Count.class 7KB
myFrame$Monitor2.class 1KB
myFrame.class 5KB
myFrame$Monitor.class 1KB
复数-计算器.jar 9KB
.settings
org.eclipse.jdt.core.prefs 629B
src
Count.java 6KB
myFrame.java 9KB
.project 384B
.classpath 301B
fuShu1.0
bin
myFrame$Windows.class 593B
Count.class 5KB
myFrame$Monitor2.class 1KB
myFrame.class 5KB
myFrame$Monitor.class 1KB
.settings
org.eclipse.jdt.core.prefs 629B
major.jar 8KB
src
Count.java 5KB
myFrame.java 9KB
复数—计算器.jar 9KB
.project 384B
.classpath 301B
man.jar 10KB
共 95 条
- 1
四散
- 粉丝: 51
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0