£¨Àý£©JavaÉú³ÉPDF±¨±í iText
// µ¼Èë£É£Ï¿âÀà
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
// µ¼Èë¡¡£Ð£Ï£É¿âÀà
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
// µ¼Èë¡¡£é£Ô£å£ø£ô¿âÀà
import com.lowagie.text.BadElementException;
import com.lowagie.text.Cell;
import com.lowagie.text.Chunk;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.PageSize;
import com.lowagie.text.Paragraph;
import com.lowagie.text.Table;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfWriter;
public class PrintStudent {
/**
* @param args
* @throws IOException
* @throws DocumentException
*/
public static void main(String[] args) throws DocumentException,
IOException {
// ¶¨ÒåÒ³Ãæ
PageSize Pg = new PageSize();
// Éú³É£Ð£Ä£ÆÎĵµÊµÀý
Document document = new Document(Pg.A4);
// ÔØÈëÖÐÎÄ×Ö¿â
BaseFont bfChinese = BaseFont.createFont("STSong-Light",
"UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
try {
// ÊäÈëÎĵµÊµÀý
PdfWriter.getInstance(document,
new FileOutputStream("Chap0101.pdf"));
document.open();
/*
* Éú³É±íÍ· ¶ÁÈ¡Îĵµ 350.XLS
*/
WillsRecor Re = new WillsRecor("350.xls");
// ¶¨ÒåµÚÒ»Ò³µÄÊý¾ÝÁÐ±í£®
ArrayList ReL;
// ¶ÁÈ¡Ò»Ò³
ReL = Re.Next();
// Èç¹û¶ÁÈ¡ÁбíÖÐÓÐÊý¾Ý£¬ÔòÉú³ÉÒ»Ò³ÄÚÈÝ£®
while (!ReL.isEmpty()) {
// ¶¨Òåҳͷ
Paragraph Title = new Paragraph();
&n
Ïà¹ØÎĵµ£º
½ñÌìѧϰÁËapplet²¼¾ÖÎÊÌ⣺
°´Å¥¡¢±êÇ©ÊÇÔõÑù¼ÓÈëµ½applet³ÌÐò(ÈÝÆ÷)µ±ÖÐÈ¥µÄÄØ£¿
ÐèÒªÓõ½²¼¾ÖÈÝÆ÷¹ÜÀíÆ÷(LayoutManager)£ºËüÓÃÓÚÐÖúÈÝÆ÷È·¶¨¼ÓÈëµÄ×é¼þ(°´Å¥µÈ)Ó¦¸Ã·ÅÖõÄλÖÃ
awtÌṩÁË4Öг£ÓõIJ¼¾ÖÈÝÆ÷¹ÜÀíÆ÷
>>FlowLayout
>>BorderLayout
>>GridLayout
>>CardLayout
appletĬÈÏÊ¹Ó ......
Êý¾Ý¿â±íµ¥µÄ´´½¨
mysql> create database shuishengmu;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql & ......
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class LinkAccess {
/**
* @param args
*/
public stat ......
ÏÖÔÚÓÃlinuxµÄÅóÓÑÔ½À´Ô½¶àÁË£¬Ç°¼¸Ìì¾ÍÓÐÁ½¸öÅóÓÑÎÊÎÒlinuxÏÂÔõôÅäÖÃjava»·¾³£¬ÎÒÏ뻹ÓкܶàÅóÓÑÏëÁ˽âѧϰÕâ·½ÃæµÄ¶«Î÷£¬¾Íдһ¸öÍêÈ«Ò»µãµÄlinux java»·¾³ÅäÖðɣ¬Ï£Íû¶Ô´ó¼ÒÓаïÖú¡£
Ò». ÏÂÔØjdk5.0 for linux
¡¡¡¡µ½sunµÄÖ÷Ò³ http://java.sun.com/j2se/1.5.0/download.jsp ÏÂÔØjdk°²×°Îļþjdk-1_5_0_05-linux-i586 ......
ij֪ÃûÃÅ»§ÍøÕ¾µÄÒ»µÀ±ÊÊÔÌâ
public class Test {
public static void stringUpd(String str) {
str = str.replace("j", "l");
System.out.println(str);
}
public static void stringBufferUpd(StringBuffer bf) {
bf.append("c");
System.out.println(bf);
}
......