方可可同学
一个小的文本编辑器:import ActionListener;import EventListener;import *;import *;import *;import *;import *;import *;public class MiniEdit extends JFrame implements ActionListener { /** * Method main * * * @param args * */ MenuBar menuBar = new MenuBar(); Menu file = new Menu("File"), edit = new Menu("Edit"), help = new Menu("Help"); MenuItem[] menuItem ={ new MenuItem("New"), new MenuItem("Open"), new MenuItem("Save"), new MenuItem("Exit"), new MenuItem("Select All"), new MenuItem("Copy"), new MenuItem("Cut"), new MenuItem("Paste"), new MenuItem("Help") }; TextArea textArea = new TextArea(); String fileName = "NoName"; Toolkit toolKit = TDefaultToolkit(); Clipboard clipboard = toolKSystemClipboard(); //opne and close message dialogs private FileDialog openFileDialog = new FileDialog(this,"Open File",FileDLOAD); private FileDialog saveFileDialog = new FileDialog(this,"Save File",FileDSAVE); public static void main(String[] args) { // TODO: Add your code here MiniEdit MyEdit = new MiniEdit(); MyEshow(); } /** * Method MiniEdit * * */ public MiniEdit() { // TODO: Add your code here setTitle("MiniEdit"); setFont(new Font("Times New Roman",FPLAIN,15)); setBackground(Cblue); setSize(500,500); setMenuBar(menuBar); menuBadd(file); menuBadd(edit); menuBadd(help); for(int i=0;i<4;i++) { add(menuItem[i]); add(menuItem[i+4]); } add(menuItem[8]); add(textArea); addWindowListener(new WindowAdapter(){//关闭窗口的事件监听 public void windowClosing(WindowEvent e){ Window()dispose(); Sxit(0); } }); //add actionListener for(int i=0;i
import *;import *;import *;import *;import *; //Date neededimport PrintWriter;
Cpp:This is a try out codeintmain(){return0;}
10分就想要这个源码?要是c#还行,开发比较快,java有点不划算
如果你的文本编辑器保存的文件名叫xt,那么改成html,直接双击打开就可以了。
win98系统?在启动电脑时按F8,直到出现一个菜单,选择进入纯DOS那一项,在命令提示符里输入以下命令: ATTRIB MSDOSSYS -S -H -R
优质论文问答问答知识库