Download Jar. Libraryless. Click here for Pure Java version (9079L/61K).
1 | !7 |
2 | |
3 | sS background = #1009946; |
4 | static IVar<S> text; |
5 | static JTextField tf; |
6 | static JDesktopPane desktop; |
7 | |
8 | p-awt {
|
9 | text = persistentVar("Text", "Show me a window!");
|
10 | |
11 | tf = jcenteredtextfield(text!); |
12 | onUpdate(tf, r { text.set(getText(tf)) });
|
13 | onEnter(tf, f go); |
14 | desktop = jTiledBackgroundDesktopPane(background); |
15 | final JPanel bg = jtransparent_recursive( |
16 | jfullcenter(withBottomMargin(550, |
17 | centerAndEast(jMinWidth(400, setFontSize(30, tf)), |
18 | withLeftMargin(10, jbutton("Go", f go))))));
|
19 | desktop.add(bg); |
20 | desktop.setLayout(layoutManagerFromFunction(voidfunc(Container c) {
|
21 | bg.setBounds(0, 0, c.getWidth(), c.getHeight()); |
22 | })); |
23 | cleanExitOnFrameClose(showFullScreen(desktop)); |
24 | focus(tf); |
25 | hideConsole(); |
26 | } |
27 | |
28 | svoid go { callStaticAnswerMethod(getText(tf)); }
|
29 | |
30 | answer {
|
31 | if "show me a window" |
32 | addInternalFrame(desktop, "Here it is.", random(100, desktop.getWidth()-100-300), 400, 300, 200); |
33 | } |
Began life as a copy of #1009944
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1009947 |
| Snippet name: | lalala 6 [OK, different background] |
| Eternal ID of this version: | #1009947/7 |
| Text MD5: | 4705fb782cb19574f1997c6c682569e3 |
| Transpilation MD5: | 825ebff5f7e78faf2acdbd8f668bc08f |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-08-27 04:15:58 |
| Source code size: | 963 bytes / 33 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 941 / 2042 |
| Version history: | 6 change(s) |
| Referenced in: | [show references] |