www.5213.net > jAvA用图形界面实现简单计算器,只需要加减乘除四种运算!界面如下,急!!!

jAvA用图形界面实现简单计算器,只需要加减乘除四种运算!界面如下,急!!!

我们实习的时候编的就是这个,我可以发给你,告诉我你的邮箱

import java.awt.BorderLayout; import java.awt.Button; import java.awt.Frame; import java.awt.GridLayout; import java.awt.Panel; import java.awt.TextField; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event

package com; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Calculator extends JFrame implements ActionListener{ private static final long serialVersionUID = 8199443193151152362L; private JButton bto_s=new

添加一个窗体.和几个组件.然后为组件添加监听就可以了!

package com.calc;import java.awt.FlowLayout;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import

下午发 五分钟搞定,先给你发个简单的,照例子自己去做你想要的计算器 package aaa; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class YunSuan implements ActionListener,ItemListener { public static JFrame jf; public

import java.awt.*; //引入AWT包 import java.awt.event.*; //引入awt.event包 import javax.swing.*; //引入javax.swing包 public class JSQ extends JFrame implements ActionListener //事件监听器为接口 { private String name[] = {"0","1", "2

示例代码如下,请参考:package test.com.test;import java.awt.*;import java.awt.event.*;import javax.swing.*;public class Cal { TextField tf = new TextField(40); //显示文本框 StringBuffer s1 = new StringBuffer(); //记录运算数字,以及保留结果

package jisuanqi; import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JButton; import javax.swing.BorderFactory; import java.awt.Rectangle; import java.awt.event.

fhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfhfh

相关搜索:

网站地图

All rights reserved Powered by www.5213.net

copyright ©right 2010-2021。
www.5213.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com