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

📄 n001sale.java

📁 我的JAVA, 不知道好不好,希望你可以改
💻 JAVA
字号:

import javax.swing.*;
import java.awt.*;

import java.io.*;
class N001Sale extends JFrame
{
  N001Sale(String s)
  {

    super(s);
    try{
        FileReader readFile=new FileReader("Sales001.txt");
        setBounds(100,100,300,300);
        setVisible(true);
        JTextArea bCenter=new JTextArea();
        bCenter.append("001"+"  "+Number001.thisorder()+"   "+Number001.thisPrice()+"\n");
        try{
             FileReader inOne=new FileReader("Sales001.txt");
             BufferedReader inTwo=new BufferedReader(inOne);
             String a=null;
             while((a=inTwo.readLine())!=null)
             {
               bCenter.append(s+"\n");
             }
             inOne.close();
             inTwo.close();
           }
         catch(IOException e)
           {
              System.out.println(e);   
           }
         Container con=getContentPane();
         con.add(bCenter,BorderLayout.CENTER);
         con.validate();
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         }
     catch(java.io.FileNotFoundException e)
         {
           System.out.println(e);   
         }
     
  }
}

⌨️ 快捷键说明

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