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).

1  
!747
2  
!actionListener {
3  
!x619 // CenteredLine
4  
5  
m {
6  
  static S snippetID = "#1000833"; // take me as an example
7  
  
8  
  static JFrame frame;
9  
  
10  
  p {
11  
    JButton btnOK = new JButton("OK");
12  
    btnOK.addActionListener(actionListener { ok(); });
13  
    JButton btnCancel = new JButton("Cancel");
14  
    btnCancel.addActionListener(actionListener { cancel(); });
15  
    
16  
    JPanel panel = topToBottomPanel();
17  
    panel.add(new JLabel("Run " + snippetID + "?", SwingConstants.CENTER));
18  
    
19  
    panel.add(new CenteredLine(btnOK, btnCancel));
20  
21  
    frame = new JFrame("Run " + snippetID);
22  
    frame.add(panel);
23  
    frame.setBounds(200, 300, 400, 250);
24  
    frame.setVisible(true);
25  
    exitOnFrameClose(frame);
26  
  }
27  
  
28  
  static void ok() {
29  
    frame.dispose();
30  
  }
31  
  
32  
  static void cancel() {
33  
    frame.dispose();
34  
  }
35  
}

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: 590 / 623
Referenced in: [show references]