Download Jar. Uses 615K of libraries. Click here for Pure Java version (2714L/19K).
1 | !7 |
2 | |
3 | lib 1012119 |
4 | |
5 | import jexer.*; |
6 | import jexer.backend.SwingBackend; |
7 | |
8 | sclass MyApplication extends TApplication { |
9 | *() throws UnsupportedEncodingException { |
10 | super(isHeadless() ? BackendType.XTERM : BackendType.SWING); |
11 | |
12 | if (getBackend() instanceof SwingBackend) |
13 | ((SwingBackend) getBackend()).setFont(loadFont(#1012116)); |
14 | |
15 | // Create standard menus for File and Window |
16 | addFileMenu(); |
17 | addWindowMenu(); |
18 | new MyWindow(this); |
19 | } |
20 | } |
21 | |
22 | sclass MyWindow extends TWindow { |
23 | *(TApplication application) { |
24 | super(application, "My Window", 30, 20); |
25 | |
26 | addLabel("This is a label", 5, 3); |
27 | addField(5, 5, 20, false, "enter text here"); |
28 | addButton("Press &Me!", 5, 8, new TAction() { |
29 | public void DO() { |
30 | MyWindow.this.messageBox("Box Title", "You pressed me, yay!"); |
31 | } |
32 | }); |
33 | } |
34 | } |
35 | |
36 | p { |
37 | startThread(new MyApplication); |
38 | } |
Began life as a copy of #1011956
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011957 |
Snippet name: | Jexer Dual Mode Test (text mode/AWT) |
Eternal ID of this version: | #1011957/7 |
Text MD5: | 964dc166ef0d14caad1bb92077d9848d |
Transpilation MD5: | c491662025ab4931b94ea2201c946399 |
Author: | stefan |
Category: | |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-24 04:35:17 |
Source code size: | 905 bytes / 38 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 534 / 1312 |
Version history: | 6 change(s) |
Referenced in: | [show references] |