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

📄 xmassalesframe.java

📁 我的JAVA, 不知道好不好,希望你可以改
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
             sales002=new FileWriter("Sales002.txt");
             out2=new BufferedWriter(sales002);
             out2.write("Number"+i+"   ");
           }
        catch(IOException f)
           {
           }
    }
    else if(e.getSource()==SN2text)
    {

                                            if(SN2text==null)
                                            {
                                             JOptionPane.showMessageDialog(this,"请输入字符","警告对话框",JOptionPane.WARNING_MESSAGE);
                                            }
                                            else
                                            {
                                             String s3=SN2text.getText();
                                             bCenter.append("   "+s3);
                                             try{
                                                 out2.write("   "+s3);
                                                }
                                             catch(IOException i)
                                                {
                                                }
                                            }
    }
    else if(e.getSource()==Q2text)
    {
             
                                          if((Integer.parseInt(Q2text.getText())>Number002.thisNumber())||(Integer.parseInt(Q2text.getText())<0)||(Q2text==null))
                                          {
                                           JOptionPane.showMessageDialog(this,"请重新输入","警告对话框",JOptionPane.WARNING_MESSAGE); 
                                          }
                                          else
                                          {
                                           String s4=Q2text.getText();
                                           Number002.changeNumber(Integer.parseInt(s4));
                                           bCenter.append("   "+s4+"\n");
                                           try{
                                                out2.write("   "+s4+"\n");
                                                out2.newLine();
                                               }
                                            catch(IOException h)
                                               {
                                               }
                                          }
    }
    else if(e.getSource()==CC3text)
    { 
        File writeFile=new File("Sales003.txt"); 
        try{
             bCenter.append("Number"+i+"   "+"003");
             i++;
             sales003=new FileWriter("Sales003.txt");
             out3=new BufferedWriter(sales003);
             out3.write("Number"+i+"   ");
           }
        catch(IOException f)
           {
           } 
    }
    else if(e.getSource()==SN3text)
    {

                                            if(SN3text==null)
                                            {
                                             JOptionPane.showMessageDialog(this,"请输入字符","警告对话框",JOptionPane.WARNING_MESSAGE);
                                            }
                                            else
                                            {
                                             String s5=SN3text.getText();
                                             bCenter.append("   "+s5);
                                             try{
                                                 out3.write("   "+s5);
                                                }
                                             catch(IOException c)
                                                {
                                                }
                                            }
    }
    else if(e.getSource()==Q3text)
    {
                                           if((Integer.parseInt(Q3text.getText())>Number003.thisNumber())||(Integer.parseInt(Q3text.getText())<0)||(Q3text==null))
                                           {
                                            JOptionPane.showMessageDialog(this,"请重新输入","警告对话框",JOptionPane.WARNING_MESSAGE); 
                                           }
                                           else
                                           {
                                            String s6=Q3text.getText();
                                            Number003.changeNumber(Integer.parseInt(s6));
                                            bCenter.append("   "+s6+"\n");
                                            try{
                                                out3.write("   "+s6+"\n");
                                                out3.newLine();
                                               }
                                            catch(IOException d)
                                               {
                                               }
                                           }
    }
    else if(e.getSource()==CC4text)
    { 
        File writeFile=new File("Sales004.txt"); 
        try{
             bCenter.append("Number"+i+"   "+"004");
             i++;
             sales004=new FileWriter("Sales004.txt");
             out4=new BufferedWriter(sales004);
             out4.write("Number"+i+"   ");
           }
        catch(IOException f)
           {
           }
    }
    else if(e.getSource()==SN4text)
    {         
                                            if(SN4text==null)
                                            {
                                             JOptionPane.showMessageDialog(this,"请输入字符","警告对话框",JOptionPane.WARNING_MESSAGE);
                                            }
                                            else
                                            {
                                             String s7=SN4text.getText();
                                             bCenter.append("   "+s7);
                                             try{
                                                 out4.write("   "+s7);
                                                }
                                             catch(IOException a)
                                                {
                                                }
                                            }
    }
    else if(e.getSource()==Q4text)
    {
                                           if((Integer.parseInt(Q4text.getText())>Number004.thisNumber())||(Integer.parseInt(Q4text.getText())<0)||(Q4text==null))
                                           {
                                            JOptionPane.showMessageDialog(this,"请重新输入","警告对话框",JOptionPane.WARNING_MESSAGE); 
                                           }
                                           else
                                           {
                                            String s8=Q4text.getText();
                                            Number004.changeNumber(Integer.parseInt(s8));
                                            bCenter.append("   "+s8+"\n");
                                            try{
                                                out4.write("   "+s8+"\n");
                                                out4.newLine();
                                               }
                                            catch(IOException b)
                                               {
                                               }
                                           }
    }   
    else if(e.getSource()==button5)
      {
        try{
            out1.close();
           }
        catch(java.io.IOException w)
           {
           }
        try{
            out2.close();
           }
        catch(java.io.IOException a)
           {
           }
        try{
            out3.close();
           }
        catch(java.io.IOException n)
           {
           }
        try{
            out4.close();
           }
        catch(java.io.IOException b)
           {
           }
        try{
            sales004.close();
           }
        catch(java.io.IOException c)
           {
           }
        try{
            sales001.close();
           }
        catch(java.io.IOException d)
           {
           }
        try{
            sales002.close();
           }
        catch(java.io.IOException s)
           {
           }
        try{
            sales003.close();
           }
        catch(java.io.IOException x)
           {
           }
      }
  
  }
}      



   
   
   
 

⌨️ 快捷键说明

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