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

22
LINES

< > BotCompany Repo | #1003384 // Color Showing Bot Backend

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

Libraryless. Click here for Pure Java version (1388L/9K/31K).

1  
!752
2  
3  
sbool error;
4  
static JFrame frame;
5  
6  
// returns false if done, otherwise calls whenDone later
7  
static bool action(S s, final Runnable whenDone) {
8  
  new Matches m;
9  
  
10  
  if "Bot shows color *" {
11  
    showColor(colorFromText(m.unq(0)));
12  
    false;
13  
  }
14  
15  
  throw fail("unknown command: " + quote(s));
16  
}
17  
18  
svoid showColor(Color color) {
19  
  if (frame == null)
20  
    frame = showCenterFrame("Color Bot!", 200, 200);
21  
  setFrameContents(frame, singleColorPanel(color));
22  
}

Author comment

Began life as a copy of #1003351

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003384
Snippet name: Color Showing Bot Backend
Eternal ID of this version: #1003384/1
Text MD5: 395e6efcec5cc295b2958b5c9f46723b
Transpilation MD5: 8544cdc1833c08bb1a088bebc478d21e
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-06-28 23:22:28
Source code size: 480 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 572 / 1139
Referenced in: [show references]