/*下面是电子书切割器源代码 被切割文件要和切割器在同一目录*/import java.awt.*;import java.awt.event.*;import java.io.*;public class TextCut extends Frame implements ActionListener,WindowListener{static TextCut f=new TextCut();static TextField fileName=new TextField("文件名字",20);static TextField fileSize=new TextField("切割后文件大小",20);static Button btn=new Button("开始切割");static String fname=""; static String fsize="";public static void main(String[] args){ f.setSize(200,150); f.setTitle("my text cut"); f.setLayout(new FlowLayout(FlowLayout.CENTER)); fileName.addActionListener(f); fileSize.addActionListener(f); btn.addActionListener(f); f.addWindowListener(f); f.add(fileSize); f.add(fileName); f.add(btn); f.setVisible(true); }public void textValueChanged(TextEvent e){ } public void windowActivated(WindowEvent e) //活动窗口{}public void windowClosed(WindowEvent e) //窗口关闭{}public
用JAVA写的电子书切割器 欢迎修改意见至wmm204@126.com
![](https://img-home.csdnimg.cn/images/20240711042549.png)