public class ReadXls {
Workbook rwb=null;
int sheets=0;
String index=null;
static int sum=1;
List<XlsEntity> list = new ArrayList<XlsEntity>();
public List<XlsEntity> qurry(String local,String idx){
try{
InputStream is = new FileInputStream(local);
rwb = Workbook.getWorkbook(is);
sheets=rwb.getNumberOfSheets();
jb2.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
ja.setText("This is a test for actionlistenner with nc56");
}
});
}
}
class testframe extends JFrame{
public testframe(){
this.setTitle("testframe");
buttonpanel bp=new buttonpanel();
add(bp);
setSize(w, h);
}
private static final int w=800;
private static final int h=800;
}
public class swingtest {
public static void main(String[] args){
testframe tf=new testframe();
tf.setVisible(true);
tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
]]>JDBC 榪炴帴ACCESS鏂規(guī)硶http://www.aygfsteel.com/zncuxt/archive/2010/08/18/329198.html杈涘餞杈涘餞Wed, 18 Aug 2010 03:47:00 GMThttp://www.aygfsteel.com/zncuxt/archive/2010/08/18/329198.htmlhttp://www.aygfsteel.com/zncuxt/comments/329198.htmlhttp://www.aygfsteel.com/zncuxt/archive/2010/08/18/329198.html#Feedback0http://www.aygfsteel.com/zncuxt/comments/commentRss/329198.htmlhttp://www.aygfsteel.com/zncuxt/services/trackbacks/329198.htmlpackage DAO;
import java.sql.*;
public class conntest {
public void connect(){
try{
String strurl="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=d:/1.mdb";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection(strurl) ;
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("select * from JIUKUNEWWINEINFO");
if (rs != null && rs.next()) {
System.out.println("1");
}
}catch(Exception e){
e.printStackTrace();
}
}
public static void main(String[] args){
conntest ct=new conntest();
ct.connect();
]]>寰蔣綆鍖朧isual Studio 闈炵▼搴忓憳涔熻兘寮鍙戣蔣浠?/title>http://www.aygfsteel.com/zncuxt/archive/2010/08/04/327941.html杈涘餞杈涘餞Wed, 04 Aug 2010 08:16:00 GMThttp://www.aygfsteel.com/zncuxt/archive/2010/08/04/327941.htmlhttp://www.aygfsteel.com/zncuxt/comments/327941.htmlhttp://www.aygfsteel.com/zncuxt/archive/2010/08/04/327941.html#Feedback0http://www.aygfsteel.com/zncuxt/comments/commentRss/327941.htmlhttp://www.aygfsteel.com/zncuxt/services/trackbacks/327941.html
8鏈?鏃ユ秷鎭紝鎹浗澶栧獟浣撴姤閬擄紝寰蔣灝嗗湪8鏈?3鏃ュ彂甯僔isual Studio LightSwitch嫻嬭瘯鐗堬紝鏃ㄥ湪綆鍖栧紑鍙戝簲鐢ㄧ▼搴忕殑榪囩▼銆傝繖涓猇isual Studio闆嗘垚寮鍙戠幆澧冮潪甯稿鏄撲嬌鐢紝鐢氳嚦涓氬姟緇忕悊閮借兘浣跨敤瀹冨紑鍙戝簲鐢ㄧ▼搴忋?/p>
]]>servlet鐨勭畝鍗曢厤緗?/title>http://www.aygfsteel.com/zncuxt/archive/2010/08/03/327871.html杈涘餞杈涘餞Tue, 03 Aug 2010 14:21:00 GMThttp://www.aygfsteel.com/zncuxt/archive/2010/08/03/327871.htmlhttp://www.aygfsteel.com/zncuxt/comments/327871.htmlhttp://www.aygfsteel.com/zncuxt/archive/2010/08/03/327871.html#Feedback0http://www.aygfsteel.com/zncuxt/comments/commentRss/327871.htmlhttp://www.aygfsteel.com/zncuxt/services/trackbacks/327871.htmlpackage servlets; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import entity.*; import DAO.*; publicclass loginservlet extends HttpServlet { /** *//** * The doPost method of the servlet. <br> * * This method is called when a form has its tag value method equals to post. * * @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @throws IOException if an error occurred */ publicvoid doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { student s=new studentDAO().login(request.getParameter("username"),request.getParameter("password")); if(s !=null){ request.setAttribute("message", "鐧婚檰鎴愬姛"); }else{ request.setAttribute("message", "鐧婚檰澶辮觸"); } request.getRequestDispatcher("/result.jsp").forward(request, response); } }