FileDocCategorySizeDatePackage
MailComposeFrame.javaAPI DocExample1250Fri Jun 09 13:20:48 BST 2000None

MailComposeFrame

public class MailComposeFrame extends JPanel
A frame for (possibly) multiple MailComposeBean windows.

Fields Summary
JDesktopPane
dtPane
JButton
newButton
protected int
nx
protected int
ny
Constructors Summary
public MailComposeFrame()


		setLayout(new BorderLayout());

		dtPane = new JDesktopPane();
		add(dtPane, BorderLayout.CENTER);

		newButton = new JButton("Compose");
		newButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				newSend();
			}
		});
		add(newButton, BorderLayout.SOUTH);
	
Methods Summary
public MailComposeBeannewSend()
To be useful here, a MailComposeBean has to be inside its own little JInternalFrame.


		// Make the JInternalFrame wrapper
		JInternalFrame jf = new JInternalFrame();

		// Bake the actual Bean
		MailComposeBean newBean = 
			new MailComposeBean(this, "Compose", 400, 250);

		// Arrange them on the diagonal.
		jf.setLocation(nx+=10, ny+=10);

		// 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 newBean;