!592 // auto-import !614 // actionListener { !619 // standard classes (LetterLayout, CenteredLine) !1000280 // class x12 import java.awt.*; import java.util.List; public class main { public static void main(String[] args) { JFrame frame = new JFrame("JavaX IDE!"); final JTextArea textArea = new JTextArea(); JButton btnGo = new JButton("Go!"); btnGo.addActionListener(actionListener { try { File ioBaseDir = new File("."); File src = x12.TempDirMaker_make(); x12.saveTextFile(new File(src, "main.java").getPath(), textArea.getText()); x12.javax4(src.getPath(), ioBaseDir, false, false); } catch (Throwable e) { popupError(e); } }); JPanel panel = new JPanel(new LetterLayout("T", "T", "B").setBorder(10)); panel.add("T", new JScrollPane(textArea)); panel.add("B", new CenteredLine(btnGo)); frame.add(panel); frame.setBounds(100, 100, 500, 400); frame.setVisible(true); exitOnFrameClose(frame); } static void exitOnFrameClose(JFrame frame) { frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } static void popupError(final Throwable throwable) { throwable.printStackTrace(); // print stack trace to console for the experts SwingUtilities.invokeLater(new Runnable() { public void run() { String text = throwable.toString(); //text = cutPrefix(text, "java.lang.RuntimeException: "); JOptionPane.showMessageDialog(null, text); } }); } }
Began life as a copy of #613
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1000281 |
Snippet name: | JavaX IDE (developing, upgraded to X12) |
Eternal ID of this version: | #1000281/1 |
Text MD5: | 8307d080e936f615df1f9474b7748364 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-05-21 18:14:17 |
Source code size: | 1579 bytes / 51 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 795 / 625 |
Referenced in: | [show references] |