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

35
LINES

< > BotCompany Repo | #1006005 // Learning to read GUI (dev.)

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

Libraryless. Click here for Pure Java version (9374L/65K/225K).

!752

concepts.

concept Example {
  BWImage image;
  S imageMD5;
  S text;
}

p {
  conceptsAndBot();
  
  JTable table = showConceptsTable(Example);
  addFrameMenu(table, "Menu", 
    jmenuitem("Add example...", "addExample"));
  addToWindow(table, jbutton("Add example...", "addExample"));
}

svoid addExample {
  final new JTextField tf;
  final new ImageChooser ic;
  showTitledForm("Add Example - " + programTitle(),
    "Image", ic,
    "Text", tf,
    r {
      BWImage image = ic.getBWImage();
      if (image == null) ret;
      Example e = cnew(Example,
        +image,
        imageMD5 := md5OfBWImage(image),
        text := trim(tf.getText()));
      checkMarkAnimation("Example saved! " + e.id + " " + quote(e.text), 2);
    });
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006005
Snippet name: Learning to read GUI (dev.)
Eternal ID of this version: #1006005/1
Text MD5: 27b68d176e8e04d9b5d2a5c6c72b53a6
Transpilation MD5: 6c1190c2986ca2356133354707204aec
Author: stefan
Category: javax / gui / ocr
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-15 16:43:26
Source code size: 779 bytes / 35 lines
Pitched / IR pitched: No / No
Views / Downloads: 567 / 1110
Referenced in: [show references]