Libraryless. Click here for Pure Java version (2538L/19K/58K).
1 | !747 |
2 | !actionListener {
|
3 | !x619 // CenteredLine |
4 | |
5 | m {
|
6 | static S snippetID = "#1000836"; // take me as an example |
7 | |
8 | static JFrame frame; |
9 | |
10 | p {
|
11 | installHelloMessage("Run dialog for " + snippetID);
|
12 | |
13 | JButton btnOK = new JButton("OK");
|
14 | btnOK.addActionListener(actionListener { ok(); });
|
15 | JButton btnCancel = new JButton("Cancel");
|
16 | btnCancel.addActionListener(actionListener { cancel(); });
|
17 | |
18 | JPanel panel = topToBottomPanel(); |
19 | panel.add(new JLabel("Run " + snippetID + "?", SwingConstants.CENTER));
|
20 | |
21 | panel.add(new CenteredLine(btnOK, btnCancel)); |
22 | |
23 | frame = new JFrame("Run " + snippetID);
|
24 | frame.add(panel); |
25 | frame.setBounds(200, 300, 400, 250); |
26 | frame.setVisible(true); |
27 | exitOnFrameClose(frame); |
28 | } |
29 | |
30 | static void ok() {
|
31 | try {
|
32 | nohupJavax("" + parseSnippetID(snippetID));
|
33 | frame.dispose(); |
34 | } catch (Throwable e) {
|
35 | popupError(e); |
36 | } |
37 | } |
38 | |
39 | static void cancel() {
|
40 | frame.dispose(); |
41 | } |
42 | } |
Began life as a copy of #1000834
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1000836 |
| Snippet name: | Run dialog with javax nohup action |
| Eternal ID of this version: | #1000836/1 |
| Text MD5: | 01585ac8f1f9483cb8eeb21b74187324 |
| Transpilation MD5: | 5ddc8bce06b75e665ab104e2ab16c8c2 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-09-03 23:19:23 |
| Source code size: | 1016 bytes / 42 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 878 / 1254 |
| Referenced in: | [show references] |