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