java socket email ÎÊÌâ - Java / Java SE
ÎÒÔÚ javaºËÐļ¼ÊõÉÏ ¿´ÁËÒ»¸ö ÀûÓà Java socket emailµÄÀý×Ó ¿ÉÊÇÔõôҲ ²»³É¹¦ Ϊʲô£¿
Ô´Âë
Java code:
package cn.com.test.email;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.util.Scanner;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
public class MailTest {
public static void main(String[] args) {
JFrame frame = new MailTestFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
@SuppressWarnings("serial")
class MailTestFrame extends JFrame {
private Scanner in;
private PrintWriter out;
private JTextField from;
private JTextField to;
private JTextField smtpServer;
private JTextArea message;
private JTextArea comm;
public static final int DEFAULT_WIDTH = 300;
public static final int DEFAULT_HEIGHT = 300;
public MailTestFrame() {
setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT);
setTitle(
Ïà¹ØÎÊ´ð£º
¹¤×÷ÐèÒª Çó´ó¼Ò°ïæд¸ö³ÌÐò
ÎÒÊÇѧC++µÄ ²»¶®JAVA
±àдһ¸öJavaÓ¦ÓóÌÐò£¬¶ÔÓÚ¸ø¶¨µÄÒ»¸ö×Ö·û´®µÄ¼¯ºÏ£¬¸ñʽÈ磺
{aaa bbb ccc}£¬ {bbb ddd}£¬{eee fff}£¬{ggg}£¬{ddd hhh}
ÒªÇó½«ÆäÖн»¼¯²»Îª¿ÕµÄ ......
Ïë×öÒ»¸öjspµÄµç×ÓÉÌÎñÍøÕ¾£¬ÏëÕÒһЩԴ´úÂ룬ÇëÎÊÄǸöÍøÕ¾ÓкõÄ×ÊÔ´¡£Ð»Ð»£¡
ËÑË÷Ï塃 ¿ªÔ´µÄÒ²ÓÐ
csdn¾ÍÓÐÏàËƵÄÔ´Â룬¥Ö÷ËÑÒ»ÏÂ
java ¿ªÔ´´óÈ«
¸ÄÄ£°åºÃÂ鷳Ŷ£¬»¹²»Èç×Ô¼ºÐ´¸öÁËÄØ
jf
¶¥Ò» ......
ÎÒ¶¨ÒåÁËÒ»¸öJRadioButtonNanµÄµ¥Ñ¡°´Å¥£¬Èç¹ûÔÚÎÒÑ¡ÔñÁËÕâ¸ö°´Å¥ºóÏëµã»÷ÖØÖÃÈÃÕâ¸ö°´Å¥´¦ÓÚδѡÔñµÄ״̬¸ÃÔõô×öÄØ£¿Çë¸ßÊÖÖ¸½Ì
jRadioButton.setSelected(false);
²»ÖªµÀÄãÊÇʲôÒâ˼
Õâ¸öÊDz»Ñ¡Ôñ״̬ÁË
Î ......
CREATE DATABASE ADDRESSLIST;
USE ADDRESSLIST;
DROP TABLE IF EXISTS FRIEND;
CREATE TABLE FRIEND
(FRIEND_ID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY ,
FRIEND_NAME VARCHAR(20) NOT N ......
²úÆ·µÄÅäÖÃÒ³Ãæ¹²ÓÃÒ»¸öÓÃJavaScriptµÄdTreeʵÏÖµÄÊ÷Ðνṹ£¬ÏÔʾµÄʱºò£¬Ê÷Ðνṹ¿¿ÔÚÒ³ÃæµÄ×î×ó±ß£¬¸úÎÒµÄÅäÖÃÒ³ÃæÖмä¸ôÁËÒ»´ó¿é£¬ÏÖÔÚÏë°ÑÊ÷ÐÎĿ¼¾ÓÖУ¬½ô¿¿ÔÚÅäÖÃÄÚÈÝÅԱߣ¬ÈçºÎ¿ØÖÆÊ÷ÐÎĿ¼µÄλÖã¬ÒÔ¼°¿É²»¿ ......