亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? counter.txt

?? 簡單的JAVA計算器
?? TXT
?? 第 1 頁 / 共 3 頁
字號:
 import javax.swing.*;
 import javax.swing.border.*;
 import java.awt.*;
 import java.awt.event.*;
 
 public class Calculator extends JFrame implements ActionListener
 {
     public static final int WIDTH = 800;            // width of the window                  
     public static final int HEIGHT = 600;           // height of the window                 
     public static final int BUTTON_WIDTH = 80;      // width of the buttons                 
     public static final int BUTTON_HEIGHT = 60;     // height of the buttons                
                                                                                             
     private CardLayout dealer;                      // card layout                          
     private JPanel        deckPanel;                   // used to card layout                  
                                                                                             
     private JTextField result;                      // the calculate result                 
     private JCheckBoxMenuItem scientificMode;       // the menu item of the mode            
                                                                                             
     private Box vPanel1;                            // the first line buttons of the        
                                                        // scientific mode.                     
                                                                                             
     private JButton mod;                            // the modular button                   
     private JButton xey;                            // the button of Yth root of X          
     private JButton ms;                             // save button                          
    private JButton mr;                             // release the stored value             
     private    JButton mc;                             // clear the stored value               
                                                                                             
     private double head = 0.0;                      // the first number of the equation     
     private double tail = 0.0;                      // the second number of the equation    
                                                                                             
     private boolean substitution = true;            // whether substituted the answer or not
                                                                                             
     private String operatedCommand = 'NOTHING';     // the current operated command         
     private String preOperatedCommand = 'NOTHING';  // remember the pre-operated command
     
     private double variableMemory = 0.0;            // the variable of the memory
     
     private JButton jButtonR;                       // the register's button
     private JButton jButtonE;                       // the edit's button
     
     private JTextField nameField;                   // the field of the name
     private JTextField countryField;                // the field of the country
     private JTextField zipField;                    // the field of the zip
     private JTextField stateField;                  // the field of the state
     private JTextField cityField ;                  // the field of the city
     private JTextField streetAddressField;          // the field of the address
     
     private JTextField first;                       // the first part of the key
     private JTextField second;                      // the second part of the key
     private JTextField third;                       // the third part of the key
     private JTextField fourth;                      // the fourth part of the key
     
     
     public Calculator()
     {
         setSize(WIDTH, HEIGHT);
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         setTitle('Normal Calculator');
         
         Container contentPre = getContentPane();    // the container of the window
         
         dealer = new CardLayout();                  // create a new card layout
         deckPanel = new JPanel();                    
         deckPanel.setLayout(dealer);
         
         Box content = Box.createVerticalBox();      // create a new vertical Box 
         
         Box registration = Box.createVerticalBox();
         
         /****************************************************
         *    menu
         *   file
         *****************************************************/
         JMenu fileMenu = new JMenu('File');         
         JMenuItem exitItemOfFile = new JMenuItem('Exit');
         exitItemOfFile.addActionListener(this);
         fileMenu.add(exitItemOfFile);
         /**
         *    menu
         *   settings
         */
         JMenu settingsMenu = new JMenu('Settings');
         JMenuItem registrationInfo = new JMenuItem('Registration Info');
         registrationInfo.addActionListener(this);
         settingsMenu.add(registrationInfo);
         
         scientificMode = new JCheckBoxMenuItem('Scientific Mode');
         scientificMode.addActionListener(this);
         settingsMenu.add(scientificMode);
         
         JMenuBar jMenuBar = new JMenuBar();
         jMenuBar.add(fileMenu);
         jMenuBar.add(settingsMenu);
         setJMenuBar(jMenuBar);
         
         /****************************************************
         *    textFiled panel
        *****************************************************/
        
        result = new JTextField('0');                     // the initiated value of the answer
        result.setBackground(Color.CYAN);                 // set the back ground color with cyan
        result.setHorizontalAlignment(JTextField.RIGHT);  // set the horizontal alignment  
        
        
        content.add(result);
             
         content.add(paintButtons());
         
         deckPanel.add('cal', content);                    // add the calculators card to the layout
         
         registration.add(paintRegistration());            // add the register window
         
         deckPanel.add('reg', registration);               // add the register window to the layout
         
         contentPre.add(deckPanel);                   // add the cards to the container
     }
     
     /**
     * paint the buttons of the two models.
     *
     */
     public Box paintButtons() 
     {
         /****************************************************
        *    Buttons
        *****************************************************/
        
         /**
         *    line1
         */ 
         vPanel1 = Box.createVerticalBox();                                      
         
         // add the backwards's button                                                                           
         JButton backwards = new JButton('1/X');                                     
         backwards.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));       
         backwards.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));     
         backwards.addActionListener(this);                                          
         vPanel1.add(backwards);    
                                                          
         // add the factorial button                                                                            
         JButton factorial = new JButton('X!');                                      
         factorial.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));       
         factorial.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));     
         factorial.addActionListener(this);                                          
         vPanel1.add(factorial);                                                     
         
         // add the square's button                                                                            
         JButton square = new JButton('<html>X<sup>2</sup></html>');                 
         square.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));          
         square.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));        
         square.addActionListener(this);
         square.setActionCommand('sqr');                                             
         vPanel1.add(square);                                                        
         
         // add the square root's button                                                                            
         JButton squareRoot = new JButton('\u221a');                                 
         squareRoot.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));      
         squareRoot.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));    
         squareRoot.addActionListener(this);                                         
         vPanel1.add(squareRoot);                                                    
               
         // add the power's button                                                                       
         JButton power = new JButton('<html>X<sup>Y</sup></html>');                  
         power.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));           
         power.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));         
         power.addActionListener(this);   
         power.setActionCommand('pow');                                           
         vPanel1.add(power);                                                         
                  
         /**
         *    line2
         */
         Box vPanel2 = Box.createVerticalBox();
         
         // add the modular button 
         mod = new JButton('Mod');
         mod.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         mod.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         mod.addActionListener(this);
         vPanel2.add(mod);
                  
         // add the seven button 
         JButton seven = new JButton('7');
         seven.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         seven.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         seven.addActionListener(this);
         vPanel2.add(seven); 
         
         // add the four button 
         JButton four = new JButton('4');
         four.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         four.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         four.addActionListener(this);
         vPanel2.add(four); 
         
         // add the one button 
         JButton one = new JButton('1');
         one.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         one.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         one.addActionListener(this);
         vPanel2.add(one); 
         
         // add the zero button 
         JButton zero = new JButton('0');
         zero.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         zero.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         zero.addActionListener(this);
         vPanel2.add(zero);
         
         /**
         *    line3
         */
         Box vPanel3 = Box.createVerticalBox();
         
         // add the Yth root of X button 
         xey = new JButton('XeY');
         xey.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         xey.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         xey.addActionListener(this);
         vPanel3.add(xey);
              
          // add the eight button 
         JButton eight = new JButton('8');
         eight.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
        eight.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         eight.addActionListener(this);
         vPanel3.add(eight); 
         
         // add the five button 
         JButton five = new JButton('5');
         five.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         five.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         five.addActionListener(this);
         vPanel3.add(five); 
         
         // add the two button 
         JButton two = new JButton('2');
         two.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         two.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         two.addActionListener(this);
         vPanel3.add(two); 
         
         // add the dot button 
         JButton dot = new JButton('.');
         dot.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         dot.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         dot.addActionListener(this);
         vPanel3.add(dot);      
         
         /**
         *    line4
         */
         Box vPanel4 = Box.createVerticalBox();
         
         // add the MS button 
         ms = new JButton('MS');
         ms.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
        ms.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         ms.addActionListener(this);
         vPanel4.add(ms);
             
         // add the nine button 
         JButton nine = new JButton('9');
         nine.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         nine.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         nine.addActionListener(this);
         vPanel4.add(nine); 
         
         // add the six button 
         JButton six = new JButton('6');
         six.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         six.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         six.addActionListener(this);
         vPanel4.add(six); 
         
         // add the three button 
         JButton three = new JButton('3');
         three.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         three.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         three.addActionListener(this);
         vPanel4.add(three); 
         
         // add the plusMinus button 
         JButton plusMinus = new JButton('\u00b1');
         plusMinus.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         plusMinus.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         plusMinus.addActionListener(this);
         vPanel4.add(plusMinus);     
         
         /**
         *    line5
         */
         Box vPanel5 = Box.createVerticalBox();
         
         // add the MR button 
         mr = new JButton('MR');
         mr.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         mr.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         mr.addActionListener(this);
         vPanel5.add(mr);
         
         // add the division button 
         JButton division = new JButton('\u00F7');
         division.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         division.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         division.addActionListener(this);
         vPanel5.add(division); 
         
         // add the multiplication button 
         JButton multiplication = new JButton('\u00d7');
         multiplication.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         multiplication.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         multiplication.addActionListener(this);
         vPanel5.add(multiplication); 
         
         // add the subtract button 
         JButton subtract = new JButton('-');
         subtract.setMaximumSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
         subtract.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品夜夜夜夜久久| 99国产精品国产精品毛片| 欧美高清在线精品一区| 欧美久久婷婷综合色| 在线视频一区二区免费| 成人国产精品视频| 91免费视频网| 欧美专区日韩专区| 日本精品一区二区三区高清| 国产福利一区二区三区视频在线 | 亚洲激情中文1区| 亚洲人123区| 夜夜嗨av一区二区三区四季av| 亚洲精品视频在线| 国产精品久久久久aaaa| 亚洲欧洲精品一区二区三区不卡| 综合分类小说区另类春色亚洲小说欧美| 国产精品视频在线看| 亚洲私人黄色宅男| 亚洲午夜一区二区三区| 青娱乐精品在线视频| 九九精品视频在线看| 国产乱码精品一品二品| 不卡一区二区三区四区| 一本一道综合狠狠老| 91麻豆精品国产自产在线| 精品对白一区国产伦| 国产精品久久免费看| 午夜电影久久久| 国产剧情一区在线| 风间由美一区二区三区在线观看 | 91啪亚洲精品| 欧美日韩一区二区三区四区五区 | 99精品视频在线观看免费| 成人蜜臀av电影| 欧美视频一区二区三区在线观看| 欧美日韩免费在线视频| 26uuu国产日韩综合| 亚洲丝袜精品丝袜在线| 美女脱光内衣内裤视频久久影院| 高清成人在线观看| 福利电影一区二区| 日韩欧美国产不卡| 国产精品网曝门| 日韩av不卡一区二区| 成人av电影免费观看| 欧美日韩精品一区二区三区 | 久久精品国产一区二区| 国产成人综合网站| 欧美人与性动xxxx| 亚洲丝袜制服诱惑| 国产·精品毛片| 欧美α欧美αv大片| 亚洲国产精品久久人人爱| 国产精品77777| 欧美日韩亚洲综合一区| 国产精品久久久久婷婷二区次| 久久成人久久鬼色| 欧美日韩一区二区三区高清| 国产精品日日摸夜夜摸av| 久久不见久久见免费视频7| 欧美性欧美巨大黑白大战| 国产精品九色蝌蚪自拍| 国产永久精品大片wwwapp| 91精品视频网| 亚洲第一搞黄网站| 日本韩国一区二区| 亚洲精品日韩一| eeuss鲁片一区二区三区在线看| 久久一区二区三区国产精品| 日本欧美一区二区| 欧美日本不卡视频| 亚洲成av人在线观看| 欧美中文字幕一二三区视频| 亚洲精品久久7777| 91黄色小视频| 一区二区在线电影| 欧洲人成人精品| 亚洲国产一区二区视频| 欧美亚洲愉拍一区二区| 亚洲电影第三页| 欧美日韩精品一区二区三区四区 | 久久久噜噜噜久噜久久综合| 麻豆精品久久久| 精品国产乱码久久久久久浪潮| 日韩成人免费看| 精品久久久久久久久久久久久久久 | 国产福利视频一区二区三区| 亚洲精品一区二区三区影院| 久久国产精品99久久人人澡| 久久久亚洲综合| 成人18视频在线播放| 日韩理论片网站| 欧美亚洲一区二区三区四区| 亚洲成人自拍网| 欧美va日韩va| 成人av电影在线观看| 亚洲精品成人天堂一二三| 欧美日本韩国一区二区三区视频| 日韩电影在线看| 久久久99久久| 色婷婷久久久亚洲一区二区三区 | 日韩免费视频线观看| 国产一区二区在线观看免费 | 亚洲午夜久久久久久久久电影网| 欧美日韩一区精品| 国产一区二区三区四区五区美女 | 91麻豆成人久久精品二区三区| 一区二区欧美精品| 日韩欧美资源站| eeuss鲁一区二区三区| 天堂资源在线中文精品| 久久综合网色—综合色88| 91美女在线视频| 麻豆精品视频在线观看视频| 国产精品美女www爽爽爽| 欧美日韩成人一区二区| 国产大片一区二区| 亚洲国产成人porn| 国产精品网站在线观看| 欧美丰满少妇xxxbbb| 国产凹凸在线观看一区二区| 午夜在线成人av| 亚洲国产精品99久久久久久久久| 欧美高清www午色夜在线视频| 丰满亚洲少妇av| 久久精品国产一区二区三区免费看 | 亚洲欧美一区二区视频| 日韩欧美一级二级| 91丨porny丨首页| 国产综合色视频| 亚洲图片欧美综合| ●精品国产综合乱码久久久久| 欧美一二三区精品| 91美女片黄在线观看91美女| 国产一区999| 美女高潮久久久| 日本午夜精品一区二区三区电影| 亚洲三级久久久| 国产精品乱子久久久久| 久久精品亚洲国产奇米99| 日韩欧美激情一区| 制服丝袜中文字幕一区| 欧美日韩精品二区第二页| 91福利国产精品| 99r国产精品| 成人av影视在线观看| 国产成人自拍高清视频在线免费播放| 蜜桃视频一区二区三区 | 这里只有精品99re| 91久久国产最好的精华液| 91玉足脚交白嫩脚丫在线播放| 精品一区二区精品| 另类专区欧美蜜桃臀第一页| 日韩国产精品久久久| 亚洲国产精品久久久男人的天堂| 一区二区三区中文在线观看| 亚洲免费观看高清完整版在线观看熊 | 精品国产一二三区| 欧美不卡123| 久久久久久影视| 亚洲国产成人私人影院tom| 久久亚区不卡日本| 久久久久久免费毛片精品| 久久久综合精品| 国产精品的网站| 亚洲一卡二卡三卡四卡无卡久久| 亚洲电影一级黄| 另类成人小视频在线| 国产精品77777竹菊影视小说| 成人做爰69片免费看网站| 91在线免费看| 欧美日韩视频在线观看一区二区三区| 欧美疯狂做受xxxx富婆| 337p粉嫩大胆噜噜噜噜噜91av| 久久久久久久电影| 综合激情网...| 五月婷婷欧美视频| 国产精品一品二品| 色老汉一区二区三区| 宅男噜噜噜66一区二区66| 久久九九全国免费| 亚洲免费av高清| 麻豆免费精品视频| 99国产精品久久久久久久久久久 | 国产精品丝袜黑色高跟| 亚洲最大的成人av| 精品在线免费视频| 91美女蜜桃在线| 欧美成人a视频| 亚洲美女淫视频| 激情欧美日韩一区二区| 99精品欧美一区二区蜜桃免费 | 欧美国产一区二区| 亚洲女子a中天字幕| 久久精品免费看| 一本到三区不卡视频| www一区二区| 午夜精品久久久久久久99樱桃| 国产精品一色哟哟哟|