Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

35
LINES

< > BotCompany Repo | #1000834 // Run dialog (UI test)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

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: 589 / 622
Referenced in: #1000836 - Run dialog with javax nohup action
#1000897 - Swing: Single-line text entry
#3000190 - Answer for stefanreich(>> t 20 questions)
#3000202 - Answer for stefanreich (>> T conversion bot)
#3000238 - Answer for stefanreich (>> t power bot)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)