zoukankan      html  css  js  c++  java
  • 计算器

    public class LoginFrame extends Frame{
     public LoginFrame()
     {
         super("计算器");
         this.setSize(200,300);
         this.setLocation(300,240);
         this.setBackground(Color.lightGray);
         this.setLayout(new GridLayout());
         this.setLayout(new  GridLayout(5,6));
         String str[]={"MC","MR","MS","M-","M+","7","8","9","/","4","5","6","*","1","2","3","-","0",".","=","+"};
         for(int i=0;i<str.length;i++)
          this.add(new Button(str[i]));
         this.setVisible(true);
     }
        public static void main(String[] args) {new LoginFrame();}

     

  • 相关阅读:
    Tips
    react
    Vue 双向绑定
    jQuery 学习笔记
    CC NOV17
    一种高效处理无修改区间或树上询问的数据结构(附代码)
    HNOI 2017
    PA2015
    bzoj 泛做
    GG
  • 原文地址:https://www.cnblogs.com/b983766/p/7000587.html
Copyright © 2011-2022 走看看