⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calculator.java

📁 PRl教学程序 PRl教学程序 PRl教学程序
💻 JAVA
字号:
/* Java Applet generated by CGLIB of B-Prolog */
import java.awt.*;
import java.applet.Applet;
import java.awt.event.*;
import java.net.*;
import java.net.*;

public class calculator extends Applet {
boolean repeat = false;
public void start(){repeat = true; }
public void stop(){repeat = false; }
Button bu_1;
Button bu_2;
Button bu_3;
Button bu_4;
Button bu_5;
Button bu_6;
Button bu_7;
Button bu_8;
Button bu_9;
Button bu_10;
Button bu_11;
Button bu_12;
Button bu_13;
Button bu_14;
Button bu_15;
Button bu_16;
Button bu_17;
public void init(){
setLayout(null);
bu_1 = new Button("0");
add(bu_1);
bu_1.setSize(52,25);
bu_1.setLocation(50,158);
bu_2 = new Button("1");
add(bu_2);
bu_2.setSize(25,25);
bu_2.setLocation(50,131);
bu_3 = new Button("2");
add(bu_3);
bu_3.setSize(25,25);
bu_3.setLocation(77,131);
bu_4 = new Button("3");
add(bu_4);
bu_4.setSize(25,25);
bu_4.setLocation(104,131);
bu_5 = new Button("4");
add(bu_5);
bu_5.setSize(25,25);
bu_5.setLocation(50,104);
bu_6 = new Button("5");
add(bu_6);
bu_6.setSize(25,25);
bu_6.setLocation(77,104);
bu_7 = new Button("6");
add(bu_7);
bu_7.setSize(25,25);
bu_7.setLocation(104,104);
bu_8 = new Button("7");
add(bu_8);
bu_8.setSize(25,25);
bu_8.setLocation(50,77);
bu_9 = new Button("8");
add(bu_9);
bu_9.setSize(25,25);
bu_9.setLocation(77,77);
bu_10 = new Button("9");
add(bu_10);
bu_10.setSize(25,25);
bu_10.setLocation(104,77);
bu_11 = new Button("C");
add(bu_11);
bu_11.setSize(25,25);
bu_11.setLocation(50,50);
bu_12 = new Button("/");
add(bu_12);
bu_12.setSize(25,25);
bu_12.setLocation(77,50);
bu_13 = new Button("*");
add(bu_13);
bu_13.setSize(25,25);
bu_13.setLocation(104,50);
bu_14 = new Button("-");
add(bu_14);
bu_14.setSize(25,25);
bu_14.setLocation(131,50);
bu_15 = new Button("+");
add(bu_15);
bu_15.setSize(25,52);
bu_15.setLocation(131,77);
bu_16 = new Button("=");
add(bu_16);
bu_16.setSize(25,52);
bu_16.setLocation(131,131);
bu_17 = new Button(".");
add(bu_17);
bu_17.setSize(25,25);
bu_17.setLocation(104,158);
}
public void paint(Graphics g){
}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -