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

31
LINES

< > BotCompany Repo | #1009740 // Make Item Page [shows name and googled picture]

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

Download Jar. Uses 4489K of libraries. Click here for Pure Java version (5264L/39K).

1  
!7
2  
3  
static JTextPane textPane;
4  
5  
p-subst {
6  
  setConsoleInputFontSize(20);
7  
  centerConsoleInput();
8  
  centerBottomConsole();
9  
  bot("Show Item Page.");
10  
  focusConsole();
11  
}
12  
13  
static bool showItemPage(S _word) {
14  
  fS word = trim(_word);
15  
  if (empty(word)) false;
16  
  fS text = word + "\n\n";
17  
  swing {
18  
    JFrame f = getFrame(textPane);
19  
    frameToFront(showFrame(word, textPane = jcenteredtextpane(text, style_bold(style_fontSize(24))), f));
20  
    textPane.setEditable(false);
21  
    focusConsole();
22  
    thread {
23  
      addImageToTextPane(textPane, quickVisualize(word));
24  
    }
25  
  }
26  
  true;
27  
}
28  
29  
answer {
30  
  if (showItemPage(s)) ret "OK";
31  
}

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: #1009740
Snippet name: Make Item Page [shows name and googled picture]
Eternal ID of this version: #1009740/16
Text MD5: 85bd51abe3016c7f4320f9e817843f01
Transpilation MD5: 6b0bb0c9ff8e51e7f4d67bed4e116fb5
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-15 21:08:56
Source code size: 652 bytes / 31 lines
Pitched / IR pitched: No / No
Views / Downloads: 380 / 974
Version history: 15 change(s)
Referenced in: [show references]