📄 lmcreator.java
字号:
// file: LM_Creator.java//// import necessary java libraries//import java.awt.*;import java.awt.event.*;import javax.swing.*;import java.util.*;import java.io.*;public class LMCreator implements Constants { // declare global variables // private static DiGraph digraph = null; // declare main program // public static void main(String[] args) { // create a vertex box panel // digraph = new DiGraph("LM Creator"); // listen for window closing events // digraph.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) {System.exit(0);} }); // resize and set the frame dimensions // digraph.pack(); // center the frame to the screen // Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize(); Rectangle frameDim = digraph.getBounds(); digraph.setLocation((screenDim.width - frameDim.width) / 2, (screenDim.height - frameDim.height) / 2); // parse command line // if (args.length == 1) { File param_file = new File(args[0]); if (param_file.canRead()) { digraph.paramFile = param_file; digraph.read(); } else { System.out.println("Cannot read file "+args[0]+"\n"); } } else if (args.length > 1) { System.out.println("You can only specify one filename\n"); } // display the frame // digraph.setVisible(true); }} //// end of file
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -