import java.util.*;
import java.util.zip.*;
import java.util.List;
import java.util.regex.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.concurrent.locks.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.table.*;
import java.io.*;
import java.net.*;
import java.lang.reflect.*;
import java.lang.ref.*;
import java.lang.management.*;
import java.security.*;
import java.security.spec.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.imageio.*;
import java.math.*;
import org.pushingpixels.substance.api.*;
import org.pushingpixels.substance.api.skin.*;
import javax.swing.undo.UndoManager;
import javax.mail.*;
import javax.mail.PasswordAuthentication;
import javax.mail.internet.*;
import java.text.*;
import javax.net.ssl.*;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.text.SimpleDateFormat;
import java.awt.datatransfer.StringSelection;
class main {
public static void main(final String[] args) throws Exception { substance();
final JTextField tfSender = jtextfield(completeGMailAddress(gmailDefaultUser()));
final JTextField tfTo = jtextfield("bill.gates@microsoft.com");
final JTextField tfSubject = jtextfield("Hello");
final JTextArea tfText = jwrappedtextarea(trim("\nHello Bill.\n\n-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!", runnableThread(new Runnable() { public void run() { try { try {
infoBox("Sending...");
quickGMail(getTextTrim(tfSender), getTextTrim(tfTo),
getTextTrim(tfSubject), getText(tfText));
infoBox("Sent!");
} catch (Throwable __e) { messageBox(__e); }
} catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "pcall-messagebox {\n infoBox(\"Sending...\");\n quickGMail(getTextTrim(..."; }})));
// TODO: keep data
titlePopupMenuItem(c, "Bigger fonts", new Runnable() { public void run() { try {
swingBiggerFonts();
disposeWindow(c);
callMain();
} catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "swingBiggerFonts();\n disposeWindow(c);\n callMain();"; }});
titlePopupMenuItem(c, "Smaller fonts", new Runnable() { public void run() { try {
swingSmallerFonts();
disposeWindow(c);
callMain();
} catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "swingSmallerFonts();\n disposeWindow(c);\n callMain();"; }});
;
hideConsole(); }
static RuntimeException rethrow(Throwable t) {
if (t instanceof Error)
_handleError((Error) t);
throw t instanceof RuntimeException ? (RuntimeException) t : new RuntimeException(t);
}
static A jminheight(A c, int h) {
return jMinHeight(c, h);
}
static A jminheight(int h, A c) {
return jMinHeight(h, c);
}
static A callMain(A c, String... args) {
callOpt(c, "main", new Object[] {args});
return c;
}
static void callMain() {
callMain(mc());
}
static String getText(final AbstractButton c) {
return c == null ? "" : (String) swingAndWait(new F0