Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

£¨Àý£©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


Ïà¹ØÎĵµ£º

java:Applet²¼¾ÖÎÊÌâ,ÈçºÎÌí¼Ó°´Å¥£¬±êÇ©ÎÊÌâ×ܽá

½ñÌìѧϰÁËapplet²¼¾ÖÎÊÌ⣺
°´Å¥¡¢±êÇ©ÊÇÔõÑù¼ÓÈëµ½applet³ÌÐò(ÈÝÆ÷)µ±ÖÐÈ¥µÄÄØ£¿
ÐèÒªÓõ½²¼¾ÖÈÝÆ÷¹ÜÀíÆ÷(LayoutManager)£ºËüÓÃÓÚЭÖúÈÝÆ÷È·¶¨¼ÓÈëµÄ×é¼þ(°´Å¥µÈ)Ó¦¸Ã·ÅÖõÄλÖÃ
awtÌṩÁË4Öг£ÓõIJ¼¾ÖÈÝÆ÷¹ÜÀíÆ÷
>>FlowLayout
>>BorderLayout
>>GridLayout
>>CardLayout
appletĬÈÏÊ¹Ó ......

»ù´¡ JAVA¶ÔMysql½øÐÐÁ¬½Ó¡¢²åÈë¡¢Ð޸ġ¢É¾³ý²Ù×÷

Êý¾Ý¿â±íµ¥µÄ´´½¨
mysql> create database shuishengmu;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql    & ......

java ·ÃÎÊaccess


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ÅäÖÃjava»·¾³±äÁ¿(Ïêϸ)

ÏÖÔÚÓÃ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 ......

java·½·¨´«ÖµºÍ´«ÒýÓÃ

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);
}

......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ