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

📄 fileviewer.java

📁 JavaMapper是一个免费的Java应用程序
💻 JAVA
字号:
import java.awt.*;import java.awt.event.*;import java.io.*;public class FileViewer extends Frame {		TextArea textarea;		public FileViewer() {		super("");						textarea = new TextArea();		textarea.setEditable(false);		add(textarea);				setSize(400,300);				this.addWindowListener(new WindowAdapter() {			public void windowClosing(WindowEvent e) {				setVisible(false);		}});	}		public void setFile(String title, String file) {		setTitle(title);		String text="",str="";		try {			DataInputStream in = new DataInputStream(new FileInputStream(file));			while((str = in.readLine()) != null) {				text += str+"\n";			}		}		catch (Exception e) {}		textarea.setText(text);		setVisible(true);	}	}

⌨️ 快捷键说明

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