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

35
LINES

< > BotCompany Repo | #1014690 // GMail Send Form (layout needs improvement)

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

Download Jar. Uses 4463K of libraries. Click here for Pure Java version (7501L/51K).

!7

p-noconsole {
  final JTextField tfSender = jtextfield(completeGMailAddress(gmailDefaultUser()));
  final JTextField tfTo = jtextfield("bill.gates@microsoft.com");
  final JTextField tfSubject = jtextfield("Hello");
  final JTextArea tfText = jwrappedtextarea(trim([[
Hello Bill.

-Sent from my JavaX computer]]));

  final JComponent c = showFormTitled("GMail Send Form",
    "From:", tfSender,
    "To:", tfTo,
    "Subject:", tfSubject,
    "Text:", jminheight(300, tfText),
    "", jbutton("Send mail!", r-thread-messagebox {
      infoBox("Sending...");
      quickGMail(getTextTrim(tfSender), getTextTrim(tfTo),
        getTextTrim(tfSubject), getText(tfText));
      infoBox("Sent!");
    }));
    
  // TODO: keep data
  titlePopupMenuItem(c, "Bigger fonts", r {
    swingBiggerFonts();
    disposeWindow(c);
    callMain();
  });
  titlePopupMenuItem(c, "Smaller fonts", r {
    swingSmallerFonts();
    disposeWindow(c);
    callMain();
  });
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1014690
Snippet name: GMail Send Form (layout needs improvement)
Eternal ID of this version: #1014690/21
Text MD5: 40b17481c96dfa1a9f5c2eeddc31c78e
Transpilation MD5: 9f1b8a6448c15e0555db2463a6817577
Author: stefan
Category: javax / mail / gui
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-01 13:58:56
Source code size: 992 bytes / 35 lines
Pitched / IR pitched: No / No
Views / Downloads: 525 / 1245
Version history: 20 change(s)
Referenced in: #1014720 - GMail Send Form, better layout (OK)