package jsq;
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JTextField;
import java.awt.*;
import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.UIManager;
import javax.swing.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2008</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Frame4 extends JFrame {
StringBuffer str;
double x,y;
int z;
static double m;
JPanel contentPane;
JMenuBar jMenuBar1 = new JMenuBar();
JMenu jMenu1 = new JMenu();
JMenu jMenu2 = new JMenu();
JMenu jMenu3 = new JMenu();
JMenuItem jMenuItem1 = new JMenuItem();
JMenuItem jMenuItem2 = new JMenuItem();
JMenuItem jMenuItem3 = new JMenuItem();
JMenuItem jMenuItem4 = new JMenuItem();
JMenuItem jMenuItem5 = new JMenuItem();
JMenuItem jMenuItem6 = new JMenuItem();
JTextField TF1 = new JTextField();
JPanel jPanel1 = new JPanel();
JButton jButton1 = new JButton();
JButton b3 = new JButton();
JButton jButton3 = new JButton();
JMenuItem jMenuItem7 = new JMenuItem();
JButton b4 = new JButton();
JButton b5 = new JButton();
JButton b6 = new JButton();
JButton b0 = new JButton();
JButton b7 = new JButton();
JButton b12 = new JButton();
JButton b17 = new JButton();
JButton b22 = new JButton();
JButton b8 = new JButton();
JButton b13 = new JButton();
JButton b18 = new JButton();
JButton b23 = new JButton();
JButton b9 = new JButton();
JButton b14 = new JButton();
JButton b19 = new JButton();
JButton b24 = new JButton();
JButton b10 = new JButton();
JButton b15 = new JButton();
JButton b20 = new JButton();
JButton b25 = new JButton();
JButton b11 = new JButton();
JButton b16 = new JButton();
JButton b21 = new JButton();
JButton b26 = new JButton();
JButton b1 = new JButton();
JButton b2 = new JButton();
public Frame4() {
try {
setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
/**
* Component initialization.
*
* @throws java.lang.Exception
*/
private void jbInit() throws Exception {
contentPane = (JPanel) getContentPane();
contentPane.setLayout(null);
this.setJMenuBar(jMenuBar1);
setSize(new Dimension(435, 350));
setTitle("计算器");
jMenu1.setText("编辑");
jMenu2.setText("查看");
jMenu3.setText("帮助");
jMenuItem1.setText("复制");
jMenuItem2.setText("粘贴");
jMenuItem3.setText("标准型");
jMenuItem4.setText("科学型");
jMenuItem5.setText("有关计算器");
TF1.setText("0");
TF1.setHorizontalAlignment(SwingConstants.RIGHT);
TF1.setBounds(new Rectangle(0, 0, 428, 21));
TF1.addActionListener(new Frame4_jTextField1_actionAdapter(this));
jPanel1.setLayout(null);
jPanel1.setBounds(new Rectangle(0, 21, 1, 1));
jButton1.setBounds(new Rectangle(12, 38, 46, 33));
b3.setBounds(new Rectangle(11, 90, 49, 37));
b3.setForeground(Color.red);
b3.setText("MC");
jMenuItem7.setText("帮助主题");
b4.setBounds(new Rectangle(9, 142, 48, 36));
b4.setForeground(Color.red);
b4.setText("MR");
b5.setBounds(new Rectangle(9, 199, 49, 38));
b5.setForeground(Color.red);
b5.setText("MS");
b6.setBounds(new Rectangle(5, 258, 50, 39));
b6.setForeground(Color.red);
b6.setText("M+");
b6.addActionListener(new Frame4_jButton6_actionAdapter(this));
b0.setBounds(new Rectangle(91, 41, 116, 32));
b0.setForeground(Color.red);
b0.setText("Bakespace");
b7.setBounds(new Rectangle(76, 92, 48, 35));
b7.setForeground(SystemColor.textHighlight);
b7.setText("7");
b12.setBounds(new Rectangle(75, 142, 48, 35));
b12.setForeground(SystemColor.textHighlight);
b12.setText("4");
b17.setBounds(new Rectangle(73, 201, 50, 35));
b17.setText("1");
b22.setBounds(new Rectangle(76, 258, 51, 37));
b22.setText("0");
b22.addActionListener(new Frame4_jButton11_actionAdapter(this));
b8.setBounds(new Rectangle(143, 93, 48, 35));
b8.setForeground(SystemColor.textHighlight);
b8.setText("8");
b8.addActionListener(new Frame4_bt8_actionAdapter(this));
b13.setBounds(new Rectangle(142, 142, 48, 35));
b13.setForeground(SystemColor.textHighlight);
b13.setText("5");
b13.addActionListener(new Frame4_jButton13_actionAdapter(this));
b18.setBounds(new Rectangle(143, 204, 50, 35));
b18.setForeground(SystemColor.textHighlight);
b18.setText("2");
b23.setBounds(new Rectangle(147, 259, 51, 34));
b23.setForeground(SystemColor.textHighlight);
b23.setText("+/-");
b23.addActionListener(new Frame4_jButton15_actionAdapter(this));
b9.setBounds(new Rectangle(213, 92, 48, 35));
b9.setForeground(SystemColor.textHighlight);
b9.setText("9");
b14.setBounds(new Rectangle(212, 143, 50, 35));
b14.setForeground(SystemColor.textHighlight);
b14.setText("6");
b19.setBounds(new Rectangle(213, 203, 50, 36));
b19.setForeground(SystemColor.textHighlight);
b19.setText("3");
b19.addActionListener(new Frame4_jButton18_actionAdapter(this));
b24.setBounds(new Rectangle(219, 259, 51, 34));
b24.setForeground(Color.red);
b24.setText(".");
b10.setBounds(new Rectangle(285, 93, 48, 36));
b10.setForeground(Color.red);
b10.setText("/");
b15.setBounds(new Rectangle(286, 143, 48, 34));
b15.setForeground(Color.red);
b15.setText("*");
b20.setBounds(new Rectangle(289, 204, 50, 34));
b20.setForeground(Color.red);
b20.setText("-");
b20.addActionListener(new Frame4_jButton22_actionAdapter(this));
b25.setBounds(new Rectangle(290, 257, 52, 35));
b25.setForeground(Color.red);
b25.setText("+");
b11.setBounds(new Rectangle(358, 90, 52, 38));
b11.setForeground(SystemColor.textHighlight);
b11.setText("sqrt");
b16.setBounds(new Rectangle(359, 145, 51, 35));
b16.setForeground(SystemColor.textHighlight);
b16.setText("%");
b21.setBounds(new Rectangle(362, 202, 50, 36));
b21.setForeground(SystemColor.textHighlight);
b21.setText("1/x");
b26.setBounds(new Rectangle(363, 259, 51, 34));
b26.setForeground(SystemColor.textHighlight);
b26.setText("=");
b1.setBounds(new Rectangle(232, 41, 87, 33));
b1.setForeground(Color.red);
b1.setText("CE");
b1.addActionListener(new Frame4_jButton28_actionAdapter(this));
b2.setBounds(new Rectangle(342, 40, 65, 33));
b2.setForeground(Color.red);
b2.setText("C");
contentPane.setBackground(new Color(131, 187, 152));
contentPane.setToolTipText("");
b1.addActionListener(new Frame4_b1_actionAdapter(this));
jMenuBar1.add(jMenu1);
jMenuBar1.add(jMenu2);
jMenuBar1.add(jMenu3);
jMenu1.add(jMenuItem1);
jMenu1.add(jMenuItem2);
jMenu2.add(jMenuItem3);
jMenu2.add(jMenuItem4);
jMenu3.add(jMenuItem5);
jMenu3.add(jMenuItem7);
cont
没有合适的资源?快使用搜索试试~ 我知道了~
用jbuilder做的计算器
共58个文件
class:19个
java:8个
java~11~:2个
需积分: 3 6 下载量 173 浏览量
2008-12-27
15:55:55
上传
评论
收藏 81KB RAR 举报
温馨提示
可以实现加减乘除四则运算,还有一些普通的常见计算器的功能
资源推荐
资源详情
资源评论
收起资源包目录
jsq.rar (58个子文件)
jsq
jsq.jpx.local 2KB
jsq.jpx 4KB
bak
jsq
Frame4.java~9~ 11KB
jsq.java~1~ 2KB
Frame4.java~11~ 11KB
Frame4.java~10~ 11KB
Frame1.java~1~ 974B
Frame4.java~13~ 11KB
Frame4.java~15~ 11KB
Frame4.java~14~ 11KB
Frame4.java~7~ 9KB
Frame4.java~16~ 12KB
Frame4.java~12~ 11KB
Frame4.java~8~ 11KB
jsq.java~2~ 2KB
jsq
jsq.jpx.local 2KB
jsq.jpx 4KB
bak
jsq
Frame1.java~7~ 9KB
Frame1.java~3~ 8KB
Frame1.java~10~ 9KB
Frame1.java~4~ 9KB
Frame1.java~11~ 9KB
Frame1.java~12~ 9KB
Frame1.java~6~ 9KB
Frame1.java~9~ 9KB
Frame1.java~5~ 9KB
Frame1.java~8~ 9KB
src
jsq
jsq.java 2KB
Frame1.java 9KB
classes
package cache
jsq.dep2 7KB
jsq
jsq$1.class 683B
Frame1$1.class 595B
jsq.class 1KB
Frame1$Bt.class 4KB
Frame1.class 5KB
jsq.jpx.local~ 2KB
src
jsq
Frame2.java 974B
Frame3.java 974B
Frame4.java 9KB
jsq.java 2KB
Frame1.java 2KB
jsj.java 2KB
classes
package cache
jsq.dep2 11KB
jsq
Frame4_b1_actionAdapter.class 560B
jsq$1.class 683B
jsj$1.class 683B
Frame4_jButton6_actionAdapter.class 637B
Frame4.class 7KB
Frame4_jTextField1_actionAdapter.class 646B
jsj.class 1KB
jsq.class 1KB
Frame4_jButton11_actionAdapter.class 640B
Frame4_jButton15_actionAdapter.class 640B
Frame3.class 1KB
Frame2.class 1KB
Frame4_jButton18_actionAdapter.class 640B
Frame1.class 2KB
jsq.jpx.local~ 2KB
共 58 条
- 1
资源评论
bingxin1128
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功