Libraryless. Click here for Pure Java version (527L/5K/13K).
!747 !actionListener { !x619 // CenteredLine m { static S snippetID = "#1000833"; // take me as an example static JFrame frame; p { JButton btnOK = new JButton("OK"); btnOK.addActionListener(actionListener { ok(); }); JButton btnCancel = new JButton("Cancel"); btnCancel.addActionListener(actionListener { cancel(); }); JPanel panel = topToBottomPanel(); panel.add(new JLabel("Run " + snippetID + "?", SwingConstants.CENTER)); panel.add(new CenteredLine(btnOK, btnCancel)); frame = new JFrame("Run " + snippetID); frame.add(panel); frame.setBounds(200, 300, 400, 250); frame.setVisible(true); exitOnFrameClose(frame); } static void ok() { frame.dispose(); } static void cancel() { frame.dispose(); } }
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: | #1000834 |
Snippet name: | Run dialog (UI test) |
Eternal ID of this version: | #1000834/1 |
Text MD5: | d443ca43dbde106cacc7fc9d29a7276b |
Transpilation MD5: | bebae2b4c6912f4f80ce3e31706ec363 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-08-29 16:38:38 |
Source code size: | 831 bytes / 35 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 588 / 620 |
Referenced in: | [show references] |