📅  最后修改于: 2022-03-11 14:52:14.653000             🧑  作者: Mango
//save file as Calculator.java and run in cmd/any IDE
import javax.swing.*; //note we use "javax" for "JFrame"
import java.awt.event.*;
class Operation(){
public void calc(){
JFrame frame1 = new JFrame("Calculator"); //frame_name("label")
frame1.setBounds(300,200,220,350); //(x_crd,y_crd,width,height)
JButton a = new JButton ("1"); //button_na