if (j == JOptionPane YES_OPTION){
System exit( );
}
}
});
File add(Open);
File add(Save);
File add(SaveAs);
File add(Exit);
InsertMain = new JMenuItem( 新建 );
InsertMain addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent arg ) {
String str = public class test {\n
+public static void main(String[] args) {\n
+System out println(\ hello java\ );\n
+}\n + } ;
textArea_ setText(str);
textField setText(getName(textArea_ getText()));
}
});
MarkColor = new JMenuItem( 标注颜色 );
MarkColor addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
String str = public class test {\n
+public static void main(String[] args) {\n
+System out println(\ hello java\ );\n
+}\n + } ;
int a = str indexOf( class );
//System out println(a);
setDocs(str substring(a a+ ) Color RED true );
}
});
Edit add(InsertMain);
Edit add(MarkColor);
setJMenuBar(Part);
getContentPane() setLayout(null);
setBounds( );
setDefaultCloseOperation(JFrame EXIT_ON_CLOSE);
final JPanel panel = new JPanel();
panel setLayout(new BorderLayout());
panel setBounds( );
getContentPane() add(panel);
textArea_ = new JTextPane();
panel add(new JScrollPane(textArea_ ) BorderLayout CENTER);
final JPanel panel_ = new JPanel();
panel_ setLayout(new BorderLayout());
panel_ setBorder(new EtchedBorder(EtchedBorder LOWERED));
panel_ setForeground(Color BLUE);
panel_ setBounds( );
getContentPane() add(panel_ );
textArea = new JTextArea();
panel_ add(new JScrollPane(textArea) BorderLayout CENTER);
try {
UIManager setLookAndFeel( sun java swing plaf nimbus NimbusLookAndFeel );
} catch (Exception ex ) {
try {
UIManager setLookAndFeel( sun java swing plaf windows WindowsClassicLookAndFeel );
} catch (Exception ex ) {
UIManager setLookAndFeel( sun java swing plaf windows WindowsLookAndFeel );
}
}
SwingUtilities updateComponentTreeUI(this);
textField = new JTextField();
textField setToolTipText( 不填自动从Java代码中提取类名 );
textField setBounds( );
getContentPane() add(textField);
final JLabel label = new JLabel();
label setText( 类名: );
label setBounds( );
getContentPane() add(label);
setResizable(false);// 屏蔽最大化按钮
textField_ = new JTextField();
textField_ setBounds( );
textField_ setToolTipText( 可以和Java交互信息 );
getContentPane() add(textField_ );
final JButton button_ = new JButton();
button_ addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent arg ) {
cmd = textField_ getText();
}
});
button_ setText( CMD命令发送 );
button_ setBounds( );
getContentPane() add(button_ );
final JButton button_ = new JButton();
button_ addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent arg ) {
String name = textField getText();
if (name trim() length() == ) {
textField setText(getName(textArea_ getText()));
}
FileOut(textField getText() + java textArea_ getText());
File file = new File(url + textField getText() + class );
if (file exists()) {
file delete();
}
String exe = cmd ;
try {
pro = Runtime getRuntime() exec(exe);
if (InPutThread != null)InPutThread stop();
if (OutPutThread != null)InPutThread stop();
if (ErrorThread != null)InPutThread stop();
InPutThread = new Thread(new RunTimeInput());
OutPutThread = new Thread(new RunTimeOutput(new InputStreamReader(pro getInputStream())));
- redis的热点数据缓存 redis热点数据切换
- 如何修改戴尔服务器的IP地址? 戴尔服务器ip地址怎么改
- mysql中ext
- 优惠券功能的业务流程设计图谱 优惠券redis处理
- redis通配符的使用
- redis是开发工具吗 redis的开发人是谁
- mysql备份一个表的数据 备份一个mysql库
- mysql中删除记录的命令 mysql删除中继日志
- mysql 判断 mysql的判断语句
- 屏蔽数据库的复杂性 mysql数据库屏蔽权限
