Java Swing JScrollPane,JTable
ͬÊÂÒªÒ»¸öºÍAccess¹¦ÄÜÀàËƵÄÈí¼þ£¬µ«ÊÇÒªÂú×ãËýÌá³öµÄ¸÷ÖÖÒªÇó¡£ËýÖªµÀÎÒÊÇ×öÈí¼þµÄ£¬ËùÒÔÈÃÎÒ¸øдһ¸ö£¬ÏëÏëËýµÄÌáµÄÐèÇóºÜÈÝÒ×ʵÏÖ£¬ËùÒԾʹðÓ¦ÁË¡£ÒòΪAccessµÄ¹¦ÄÜËý¾ÍÓÃÀ´¹ÜÀí±í¸ñ£¬ÈÕ³£µÄºÜ¶à±í¸ñºÜ¶à£¬¶¼ÐèÒª½øÐеç×ÓµµµÄµÇ¼Ç¡£´ËÈí¼þ¿Ï¶¨ÒªÊµÏÖ±í¸ñ²Ù×÷µÄ¹¦ÄÜ£¬ËäÈ»¸ãJAVAÒѾ¿ìÁ½ÄêÁË£¬µ«ÊÇ»ù±¾É϶¼ÊÇдB/S¼Ü¹¹µÄ¡£ÕûÒ»¸öJScrollPaneÓëJTableã¶ÊÇ»¨ÁËÎÒÒ»¸öСʱ£¬Ö÷Òª¾Í¿¨ÔÚ±í¸ñµÄˮƽ¹ö¶¯ÌõÎÞ·¨¹ö¶¯¡£
ÒÔÏÂÊÇÁ½ÕßµÄ×éºÏʾÀý,Ô´ÂëÖÐÒѾ¼ÓÈë±ØÒªµÄ×¢ÊÍ£º
1.Ö÷½çÃæ
package ibees.swing;
import java.awt.HeadlessException;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
/**
*JScrollPaneºÍJTableµÄʹÓÃʾÀý
* @author hhzxj2008
*/
public class JScrollPaneSample extends JFrame{
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
java.awt.EventQueue.invokeLater(new Runnable(){
public void run() {
new JScrollPaneSample("¹ö¶¯Ê¾Àý").setVisible(true);
}
});
}
public JScrollPaneSample(String title) throws HeadlessException {
super(title);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JTable table = new JTable(new SampleTableModel(20000,40));
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);//¹Ø±Õ±í¸ñÁÐ×Ô¶¯µ÷Õû£¬´Ëʱˮƽ¹ö¶¯Ìõ¿É¼û
JScrollPane jscrollPane = new JScrollPane(table);//½«TableÌí¼Óµ½¿É¹ö¶¯Paneµ±ÖÐ
add(jscrollPane);
//ÉèÖÃJFrame´°ÌåµÄ´óСΪ·Ö±æÂÊ-50£¬²¢ÉèÖô°ÌåµÄ×óÉϽǵÄλÖÃ
setBounds(25,25,(int)Toolkit.getDefaultToolkit().getScreenSize().getWidth()-50,(int)Toolkit.getDefaultToolkit().getScreenSize().getHeight()-50);
}
}
2.TableModel
package ibees.swing;
import javax.swing.table.AbstractTableModel;
/**
* ±í¸ñÄ£°å£¬Ö¸¶¨Ê¹ÓôËÄ£°åµÄ±í¸ñµÄÐÐÊýºÍÁÐÊý£¬²¢Ö¸¶¨ÁкÍÐн»»ã´¦µÄÖµ¡£
* @author hhzxj2008
*/
public class SampleTableModel extends AbstractTableModel{
private int rowNum
Ïà¹ØÎĵµ£º
²âÊÔ»·¾³£ºwin2000+jdk1.4+jb2006
import java.io.*;
import java.util.Enumeration;
//import java.util.zip.*;
import org.apache.tools.zip.*;
public class Test {
//½âѹÎļþ
public static void extZipFileList(String zipFileName, String extPlace) {
try {
  ......
ÃæÏò¶ÔÏó±à³ÌÓÐÈý¸öÌØÕ÷£¬¼´·â×°¡¢¼Ì³ÐºÍ¶à̬¡£
·â×°Òþ²ØÁËÀàµÄÄÚ²¿ÊµÏÖ»úÖÆ£¬´Ó¶ø¿ÉÒÔÔÚ²»Ó°ÏìʹÓÃÕßµÄÇ°ÌáϸıäÀàµÄÄÚ²¿½á¹¹£¬Í¬Ê±±£»¤ÁËÊý¾Ý¡£
¼Ì³ÐÊÇΪÁËÖØÓø¸Àà´úÂ룬ͬʱΪʵÏÖ¶à̬ÐÔ×÷×¼±¸¡£ÄÇôʲôÊǶà̬ÄØ£¿
·½·¨µÄÖØд ......
package homework02;
import java.util.Scanner;
/*
* ±àдÁ½¸öÀࣺAºÍB£¬ÀàA´´½¨µÄ¶ÔÏó¿ÉÒÔ¼ÆËãÁ½¸öÕýÕûÊýµÄ×î´ó¹«Ô¼Êý£¬ÀàB´´½¨µÄ
* ¶ÔÏó¿ÉÒÔ¼ÆËãÁ½¸öÊýµÄ×îС¹«±¶Êý¡£ÒªÇó£ºÀàBÖÐÓÐÒ»¸ö³ÉÔ±±äÁ¿Ê±ÓÃÀàAµÄÉùÃ÷¶ÔÏó¡£
*/
public class A {
private int m;
private int n;
public A(){
this.intput();
......
ÔÚ·Ö²¼Ê½·þÎñ¿ò¼ÜÖУ¬Ò»¸ö×î»ù´¡µÄÎÊÌâ¾ÍÊÇÔ¶³Ì·þÎñÊÇÔõôͨѶµÄ£¬ÔÚJavaÁìÓòÖÐÓкܶà¿ÉʵÏÖÔ¶³ÌͨѶµÄ¼¼Êõ£¬ÀýÈ磺RMI¡¢MINA¡¢ESB¡¢Burlap¡¢Hessian¡¢SOAP¡¢EJBºÍJMSµÈ£¬ÕâЩÃû´ÊÖ®¼äµ½µ×ÊÇЩʲô¹ØϵÄØ£¬ËüÃDZ³ºóµ½µ×ÊÇ»ùÓÚʲôÔÀíʵÏÖµÄÄØ£¬Á˽âÕâЩÊÇʵÏÖ·Ö²¼Ê½·þÎñ¿ò¼ÜµÄ»ù´¡ÖªÊ¶£¬¶øÈç¹ûÔÚÐÔÄÜÉÏÓиߵÄÒªÇóµÄ»°£¬ÄÇÉ ......
×÷ÕߣºÐûÕ×Åô
------------------------------------------------------------------------------------------------------------------------------------------
¹¤×÷µÚÒ»²½£ºÊìϤMyEclipseµÄ»·¾³ÒÔ¼°Ö÷Òª¹¦ÄÜ¡£
¹¤×÷µÚ¶þ²½£º½¨Á¢Êý¾Ý¿âÁ¬½Ó
Êý¾Ý¿â£ºMySQL
1¡¢MySQLµÄÅäÖÃÓëÎÊÌâ½â¾ö
Ïê¼ûÎ ......