Download Jar. Libraryless. Click here for Pure Java version (6724L/50K/190K).
1  | !7  | 
2  | |
3  | static void go(final BufferedImage img, S title) {
 | 
4  | final JTextField tf = jTextField(title);  | 
5  |   showFormTitled("Upload Image",
 | 
6  |     "Image title (optional)", tf, func {
 | 
7  | disableSubmitButton(getFrame(tf));  | 
8  |       thread "Upload Image" {
 | 
9  |         try {
 | 
10  |           messageBox("Image uploaded as " + uploadImage(getTextTrim(tf), toPNG(img));
 | 
11  | disposeFrame(tf);  | 
12  |         } catch e {
 | 
13  | enableSubmitButton(getFrame(tf));  | 
14  | messageBox(e);  | 
15  | }  | 
16  | }  | 
17  | false;  | 
18  | });  | 
19  | }  | 
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: | #1007313 | 
| Snippet name: | Upload Image [hotwirable module] | 
| Eternal ID of this version: | #1007313/11 | 
| Text MD5: | 48014f46ad6a4df10901071b32a87593 | 
| Transpilation MD5: | 7ae1d560139e6ae978935371c88ece6d | 
| Author: | stefan | 
| Category: | javax / gui | 
| Type: | JavaX module | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2017-03-15 03:04:11 | 
| Source code size: | 518 bytes / 19 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 792 / 2096 | 
| Version history: | 10 change(s) | 
| Referenced in: | [show references] |