一聚教程网:一个值得你收藏的教程网站

热门教程

用javamail发邮件(含附件),用jBuilder3实现

时间:2022-07-02 18:11:27 编辑:袖梨 来源:一聚教程网

//Title:        Your Product Name
//Version:
//Copyright:    Copyright (c) 1999
//Author:       Your Name
//Company:      Your Company
//Description:  Your description
package Mail;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
public class SendMail extends Frame {
  Label label1 = new Label();
  TextField textField1 = new TextField();
  Label label2 = new Label();
  TextField textField2 = new TextField();
  Label label3 = new Label();
  TextArea textArea1 = new TextArea();
  Label label4 = new Label();
  TextField textField3 = new TextField();
  Button button1 = new Button();
  Button button2 = new Button();
  public SendMail() {
   enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try  {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if(e.getID() == WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
    }
  }
  public static void main(String[] args) {
    SendMail sendMail1 = new SendMail();
    sendMail1.setSize (400,400);

热门栏目