javaÁÄÌìÊÒ¡¾×ª¡¿
¿Í»§¶Ë:
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.awt.*;
public class ClientPoint extends JFrame implements ActionListener,KeyListener{
static int SERVERPORT=8088;
static String SERVERADDRESS="127.0.0.1";
private BufferedReader cin=null;
private PrintWriter cout=null;
private Socket client=null;
public String clientname;
private JPanel jPanel1=new JPanel();
private JTextField jTextSendInfo=new JTextField(38);
private JTextArea jTextGetInfo=new JTextArea(16,33);
public JScrollPane areaScrollPane=new JScrollPane(jTextGetInfo);
private Button Send=new Button("·¢ËÍ");
private Button Link=new Button("Á¬½Ó");
public ClientPoint(){
super("ÁÄÌìÊÒ^_^");
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
setSize(480,465);
jPanel1.add("South",jTextSendInfo);
jPanel1.setBackground(new Color(75, 234, 166));
jTextGetInfo.setBackground(new Color(122,150,223));
jTextGetInfo.setFont(new java.awt.Font("Dialog", 0, 15));
jTextGetInfo.setForeground(new Color(176, 42, 0));
this.setResizable(false);
Send.setBackground(Color.pink);
Send.setForeground(Color.blue);
Send.setBounds(new Rectangle(92, 400, 90, 37));
Link.setBackground(Color.pink);
Link.setForeground(Color.blue);
areaScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
areaScrollPane.setAutoscrolls(true);
jTextSendInfo.setText("");
jPanel1.add("North",areaScrollPane);
jTextGetInfo.setEditable(false);
jPanel1.add("So
Ïà¹ØÎĵµ£º
ѧjavaÒѾÓÐÒ»¶Îʱ¼äÁË¡£Ñ§µÄ¶«Î÷²»¶à£¬µ«ÎÒûÏëµ½½ö½öÃæÏò¹ý³ÌµÄһЩ֪ʶ£¨Loops£©¾Í¿ÉÒÔ×ö³öÏñÎå×ÓÆåÕâÑùµÄÓÎÏ·£¬ÎÒ²»µÃ²»¸Ð̾javaÓïÑÔµÄ÷ÈÁ¦¡£ÌرðÊÇÁ˽⵽javaµÄÓ¦ÓÃÖ®¹â·º£¬Éæ¼°ÊÖ»ú£¬Ç¶Èëʽ¿ª·¢£¬pc£¬ÆóÒµ¼°·þÎñÆ÷µÈÖ®ºó£¬ÎÒ¸ü¼á¶¨ÁËѧϰjavaµÄ¾öÐÄ¡£µ«ÊÇÎÒÒ²µ£ÐÄ×Ô¼ºÑ§²»°¡ºÃ¡£ºÜ¶à¶«Î÷¶¼ÊÇÔÚÀÏʦµÄÀÏÁìµ¼ÏÂÍê³ÉµÄ£ ......
1.staticÉùÃ÷±äÁ¿µÄÓ÷¨ÔÚ»ù´¡ÖªÊ¶ÀïÃæ£»
JavaÀïÃæstaticÓÃÀ´ÉùÃ÷º¯ÊýµÄ×÷Óãº
A.¿ÉÒÔ²»Óô´½¨¶ÔÏó£¨ÊµÀý£©£¬¶øÖ±½Óµ÷Ó×—Àà.·½·¨
B.ÓÃÓÚmainº¯ÊýµÄ·½·¨
2.new——·ÖÅä¿Õ¼äÎÊÌâ
ÓжàÉÙne ......
/////////////////////DogTestDrive/////////////////////
class DogTestDrive {
public static void main(String[] args) {
Dog one = new Dog();
one.size = 70;
Dog two = new Dog();
two.size = 8;
......
1¡¢Óï·¨£º±ØÐë±È½ÏÊìϤ£¬ÔÚд´úÂëµÄʱºò IDE µÄ±à¼Æ÷¶ÔijһÐб¨´íÓ¦¸ÃÄܹ»¸ù¾Ý±¨´íÐÅÏ¢ÖªµÀÊÇʲôÑùµÄÓï·¨´íÎó²¢ÇÒÖªµÀÈκÎÐÞÕý¡£
2¡¢ÃüÁ±ØÐëÊìϤ JDK ´øµÄһЩ³£ÓÃÃüÁî¼°Æä³£ÓÃÑ¡ÏÃüÁîÖÁÉÙÐèÒªÊìϤ£ºappletviewer¡¢HtmlConverter¡¢jar¡¢java¡¢javac¡¢javadoc¡¢javap¡¢javaw¡¢native2ascii¡¢serialve ......