java课程设计----图书馆管理系统
}
}
package edu.njust.cs; import javax.swing.*; import java.awt.*; public class LayoutUtil{
public static void add(Container c,int fill,int anchor,int weightx,int weighty, int x,int y,int width,int height,Component comp){ }
//使用JDBC直接建立数据库连接, 从配置文件读取驱动程序信息 import java.sql.*;
import java.util.Properties; import java.io.*; public class JdbcProp{
public static void main(String[] args){
try{
Properties prop=new Properties();
prop.load(new FileInputStream("db.cfg"));
GridBagConstraints constraints=new GridBagConstraints(); }
public static void add(Container c,int fill,int anchor,int weightx,int weighty,int
GridBagConstraints constraints=new GridBagConstraints(); }
constraints.insets=insets; constraints.fill=fill; constraints.anchor=anchor; constraints.weightx=weightx; constraints.weighty=weighty; constraints.gridx=x; constraints.gridy=y;
constraints.gridwidth=width; constraints.gridheight=height; c.add(comp,constraints); constraints.fill=fill; constraints.anchor=anchor; constraints.weightx=weightx; constraints.weighty=weighty; constraints.gridx=x; constraints.gridy=y;
constraints.gridwidth=width; constraints.gridheight=height; c.add(comp,constraints);
x,int y,int width,int height,Component comp,Insets insets){