Java Reference
In-Depth Information
// Make the new Bean be the contents of the JInternalFrame
jf . setContentPane ( newBean );
jf . pack ();
jf . toFront ();
// Add the JInternalFrame to the JDesktopPane
dtPane . add ( jf );
return
return newBean ;
}
/* Construct a MailComposeFrame, with a Compose button. */
public
public MailComposeFrame () {
setLayout ( new
new BorderLayout ());
dtPane = new
new JDesktopPane ();
add ( dtPane , BorderLayout . CENTER );
newButton = new
new JButton ( "Compose" );
newButton . addActionListener ( new
new ActionListener () {
public
public void
void actionPerformed ( ActionEvent e ) {
newSend ();
}
});
add ( newButton , BorderLayout . SOUTH );
}
}
The file TODO.txt in the email source directory lists a number of improvements that would
have to be added to the MailClient program to make it functional enough for daily use (de-
lete and reply functionality, menus, templates, aliases, and much more). But it is a start and
provides a structure to build on.
See Also
There are several books that discuss Internet mail. Start with Elliotte Rusty Harold's
JavaMail API (O'Reilly). Kevin Johnson's Internet Email Protocols: A Developer's Guide
(Addison-Wesley) covers the protocols and has appendixes on various programming lan-
guages, including Java. The Programmer's Guide to Internet Mail: SMTP, POP, IMAP, and
LDAP , by John Rhoton (Digital Press) and Essential E-Mail Standards: RFCs and Protocols
Made Practical by Pete Loshin (Wiley) cover the protocols without much detail on Java im-
plementation. Finally, the topics Stopping Spam: Stamping Out Unwanted Email and News
Search WWH ::




Custom Search