www.rlmx.net > jAvA 计算器

jAvA 计算器

下面文件名要为:JiSuanQi.java import java.awt.*; import java.awt.event.*; public class JiSuanQi { String s="",s1=null,s2=null; Frame f=new Frame("计算器"); TextField tf=new TextField(30); Panel p1=new Panel(); Panel p2=new Pane...

java设计计算器,主要是使用java swing,对每个按钮进行监听,实现相关功能,如下代码: package com.qiu.lin.he;import java.awt.BorderLayout;import java.awt.Color;import java.awt.GridLayout;import java.awt.event.ActionEvent;import ja...

public class SanJiao {public static void main(String[] args) {double a = Math.toRadians(90);//把数字90 转换成 90度System.out.println(Math.sin(a));//计算sin 90度double b = Math.toRadians(30);System.out.println(Math.cos(b));doubl...

class CalcBtn extends JButton { private static final long serialVersionUID = 1L; Font font = new Font("仿宋", 1, 22); public CalcBtn(String text, Color color) { super(text); setForeground(color); setFont(font); setMargin(new In...

是用awt和swing做的,很好看比单单用AWT做好看 import java.awt.*; import javax.swing.*; public class Conputer extends JFrame { protected Container con = getContentPane();// 指向内容面板 protected JMenuBar a = new JMenuBar();// 菜...

import java.awt.*; import java.awt.event.*; import javax.swing.*; /**********************Java计算器 主类*********************/ public class Calculator implements ActionListener { JFrame f; JMenu mEdit; JMenu mView; JMenu mHelp;...

给你个现成的,直接编译运行,请采纳import java.awt.BorderLayout;import java.awt.Color;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing....

纯原创,已编译运行无错误,运用的是最简单最基本的知识,简单易懂,望采纳 (一)源代码 import java.awt.*; import java.awt.event.*; public class JSQ { public static void main(String[] args) { //创建新的面板 JSQFrame f = new JSQFram...

//声明需要插入的包import java.awt.*;import java.lang.Object; import java.lang.String;import javax.swing.*;import java.awt.event.*;import java.awt.TextComponent;//声明一个主类jisuanqi,继续窗口类Framepublic class jisuanqi extend...

package main; import java.awt.Button; import java.awt.Color; import java.awt.GridLayout; import java.awt.Panel; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.math.BigDecimal; import javax....

网站地图

All rights reserved Powered by www.rlmx.net

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