java¼òµ¥ÁÄÌìÊÒ
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import javax.swing.*;
public class Applet1 extends Applet implements ActionListener,ItemListener
{
TextArea mainText;
JTextField input;
JButton sendButton,disconnectButton,connectButton;
Checkbox secretCheck;
Choice objChoice;
String name="´ó¼Ò";
public void init()
{
mainText=new TextArea("",10,15);
input=new JTextField("",40);
sendButton=new JButton("·¢ËÍ");
sendButton.setForeground(Color.blue);
disconnectButton=new JButton("¶Ï¿ªÁ¬½Ó");
disconnectButton.setForeground(Color.blue);
connectButton=new JButton("Á¬½ÓÖ÷»ú");
connectButton.setForeground(Color.blue);
secretCheck=new Checkbox("ÃÜ̸");
objChoice=new Choice();
objChoice.add("´ó¼Ò");
objChoice.add("little girl");
objChoice.add("boy");
this.setBackground(new Color(200,210,50));
add(new ChatPanel());
sendButton.addActionListener(this);
objChoice.addItemListener(this);
}
public void actionPerformed(ActionEvent e)
{
mainText.append("Äã¶Ô"+name+"˵:"+input.getText()+"\n");
input.setText("");
}
public void itemStateChanged(ItemEvent e)
{
name=(String)e.getItem();
}
class ChatPa
Ïà¹ØÎĵµ£º
JAVA×¢ÊÍ·½·¨¼°¸ñʽ
1¡¢µ¥ÐÐ(single-line)--¶Ì×¢ÊÍ£º//……
µ¥¶ÀÐÐ×¢ÊÍ£ºÔÚ´úÂëÖе¥ÆðÒ»ÐÐ×¢ÊÍ£¬ ×¢ÊÍÇ°×îºÃÓÐÒ»ÐпÕÐУ¬²¢ÓëÆäºóµÄ´úÂë¾ßÓÐÒ»ÑùµÄËõ½ø²ã¼¶¡£Èç¹ûµ¥ÐÐÎÞ·¨Íê³É£¬ÔòÓ¦²ÉÓÿé×¢ÊÍ¡£
×¢Ê͸ñʽ£º/* ×¢ÊÍÄÚÈÝ */
ÐÐÍ·×¢ÊÍ£ºÔÚ´úÂëÐеĿªÍ·½øÐÐ×¢ÊÍ¡£Ö÷ҪΪÁËʹ¸ÃÐд ......
¡¡1¡¢Ê¹ÓÃjava.util.ResourceBundleÀàµÄgetBundle()·½·¨
ʾÀý£º
String name = "logging"; // the logging.properties file in src root folder
ResourceBundle rb = ResourceBundle.getBundle(name,Locale.getDefault());
// test the rb
String propertyKey = "xxx";
System.out.println(rb.getString(propert ......
package com.project.ajaxs;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.Calendar;
import java.uti ......
1¡¢ÔÚoracleµÄsys-sysdbaϵǽ
дһ¸öjava source³ÌÐòÁ´½Ósqlserver2005£º
create or replace and compile java source named test as
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class excutesql1
{
public static String entry ......
³õѧÕ߸üÊʺÏʹÓÃÎı¾±à¼Èí¼þÀ´Ñ§Ï°Java£¬¶ÔJavaÓÐÒ»¶¨ÈÏʶºóÍƼöʹÓÃEclipse£¬¶ÔÄÇЩҪÇ󿪷¢Ð§ÂʵijÌÐòÔ±µ±È»Ê×Ñ¡¾ÍÊÇJBuilder¡£
¶ÔÓÚÎı¾±à¼Èí¼þÎÒÍƼöEditPlus£¬EditPlusÊǺܶà³ÌÐòÔ±·Ç³£ÊìϤµÄ±à¼¹¤¾ß£¬ËüÒÔÕ¼ÓÃϵͳ×Ê
ԴС¡¢²Ù×÷¼ò±ãÁé»î¡¢Ö§³ÖÎļþÀàÐͷḻ ......