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

27
LINES

< > BotCompany Repo | #1009955 // Fancy Control Frame

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

Download Jar. Libraryless. Click here for Pure Java version (9576L/65K).

!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);
  autoFixDesktopPane(desktop);
  addFullSizeComponent(desktop, jtransparent_recursive(jTopCenter(hstackWithSpacing(withTopMargin(60,
    hstackWithSpacing(jMinWidth(400, setFontSize(30, tf)),
      jbutton("OK", f go)/*,
      jbutton("Exit", f cleanKill)*/))))));
  cleanExitOnFrameClose(showMaximizedFrame(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 #1009950

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: #1009955
Snippet name: Fancy Control Frame
Eternal ID of this version: #1009955/5
Text MD5: 7772f1595eb00e2e4d2bbfb83a74d646
Transpilation MD5: 1e23a7f53c9d8c07a480293d0d70650e
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-09-10 18:55:07
Source code size: 856 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 619 / 1336
Version history: 4 change(s)
Referenced in: [show references]