1 | !629 // standard function adder
|
2 | !592 // auto-import
|
3 | !614 // actionListener {
|
4 | !619 // standard classes (LetterLayout, CenteredLine)
|
5 | !1000280 // class x12
|
6 |
|
7 | import java.awt.*;
|
8 | import java.util.List;
|
9 |
|
10 | public class main {
|
11 | public static void main(String[] args) {
|
12 | JFrame frame = new JFrame("JavaX IDE!");
|
13 |
|
14 | final JTextArea textArea = new JTextArea();
|
15 | JButton btnGo = new JButton("Go!");
|
16 | btnGo.addActionListener(actionListener {
|
17 | try {
|
18 | File ioBaseDir = new File(".");
|
19 | File src = x12.TempDirMaker_make();
|
20 | x12.saveTextFile(new File(src, "main.java").getPath(), textArea.getText());
|
21 | x12.javax4(src.getPath(), ioBaseDir, false, false);
|
22 | } catch (Throwable e) {
|
23 | popupError(e);
|
24 | }
|
25 | });
|
26 |
|
27 | JPanel panel = new JPanel(new LetterLayout("T", "T", "B").setBorder(10));
|
28 | panel.add("T", new JScrollPane(textArea));
|
29 | panel.add("B", new CenteredLine(btnGo));
|
30 | frame.add(panel);
|
31 |
|
32 | frame.setBounds(100, 100, 500, 400);
|
33 | frame.setVisible(true);
|
34 | exitOnFrameClose(frame);
|
35 | }
|
36 | }
|