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

26
LINES

< > BotCompany Repo | #1009950 // lalala 7 [testing Nimbus L&F]

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

Download Jar. Libraryless. Click here for Pure Java version (9241L/62K).

!7

sS background = #1009946;
static IVar<S> text;
static JTextField tf;
static JDesktopPane desktop;

p-nimbus-noconsole {
  text = persistentVar("Text", "Show me a window!");
  
  onEnter(tf = bindTextFieldToVar(text, jcenteredtextfield(text!)), f go);
  desktop = jTiledBackgroundDesktopPane(background);
  addFullSizeComponent(desktop, jtransparent_recursive(jTopCenter(hstackWithSpacing(withTopMargin(60,
    hstackWithSpacing(jMinWidth(400, setFontSize(30, tf)),
      jbutton("OK", f go),
      jbutton("Exit", f cleanKill)))))));
  cleanExitOnFrameClose(showFullScreen(desktop));
  focus(tf);
}

svoid go { callStaticAnswerMethod(getText(tf)); }

answer {
  if "show me a window"
    addInternalFrame(desktop, "Here it is.", random(100, desktop.getWidth()-100-300), 400, 300, 200);
}

Author comment

Began life as a copy of #1009947

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, imzmzdywqqli, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009950
Snippet name: lalala 7 [testing Nimbus L&F]
Eternal ID of this version: #1009950/18
Text MD5: dfcbda0bcabf9362c552d7ec49e7353a
Transpilation MD5: 32641838ed8681e5408903e4eceb6240
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 15:22:42
Source code size: 816 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 408 / 951
Version history: 17 change(s)
Referenced in: [show references]