• MyEclipse+MySql+Struts2+Hibernate3新闻发布系统

    这是一个由Struts2和Hibernate整合而成的新闻发布系统,采用MyEclipse9.0开发工具和Mysql数据库,附有数据库文件,完整的源代码,很适合初学者学习使用

    4
    173
    9.87MB
    2011-06-26
    9
  • Struts2.2.1.1.chm帮助文档

    这是我千辛万苦自己做得Struts2.2.1.1的帮助文档,希望能够对学习者有所帮助!

    0
    48
    1.62MB
    2011-04-23
    9
  • JSP中文乱码问题完全解决方案(罗列了在JSP学习中出现的各种乱码问题)

    本文列举了再JSP开发中出现的各种中文乱码问题,并且给出了解决方案,内容详细。配有截图,希望对JSP学习者有帮助!

    0
    45
    546KB
    2011-03-25
    0
  • 云端软件平台(从此以后软件无需安装就可以拿来用了)

    这是一款可以在机子上进行虚拟化的软件,你只要在云端下载了软件就可以在机子上运行,无需安装,非常方便

    0
    235
    3.42MB
    2011-03-16
    14
  • XMLSpy2011注册机(还有其他的功能哦)

    这是xmlspy2011的注册机,可以生成很多的key,非常实用,而且还可以生成其他软件的key,内容很多

    5
    76
    307KB
    2011-03-16
    9
  • 银行取款转账系统(Java编写)

    这是用Java编写的一个简单的银行转账系统,包括取款,存款,转账等功能,其中用到了数据库的连接,采用Eclipse编写,包含数据库的设计文件。非常适合有一定基础的Java初学者使用。 package com.gujunjia.bank; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.sql.*; /** * * @author gujunjia */ public class DataBase { static Connection conn; static PreparedStatement st; static ResultSet rs; /** * 加载驱动 */ public static void loadDriver() { try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { System.out.println("加载驱动失败"); } } /** * 创建数据库的连接 * * @param database * 需要访问的数据库的名字 */ public static void connectionDatabase(String database) { try { String url = "jdbc:mysql://localhost:3306/" + database; String username = "root"; String password = "gujunjia"; conn = DriverManager.getConnection(url, username, password); } catch (SQLException e) { System.out.println(e.getMessage()); } } /** * 关闭数据库连接 */ public static void closeConnection() { if (rs != null) { // 关闭记录集 try { rs.close(); } catch (SQLException e) { e.printStackTrace(); } } if (st != null) { // 关闭声明 try { st.close(); } catch (SQLException e) { e.printStackTrace(); } } if (conn != null) { // 关闭连接对象 try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } } package com.gujunjia.bank; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * 本类主要实现整个系统的界面 * * @author gujunjia */ public class MainFrame extends JFrame implements ActionListener, FocusListener { /** * */ private static final long serialVersionUID = 1L; public static String userId; JTextField userIdText; JPasswordField passwordText; JButton registerButton; JButton logInButton; public MainFrame() { super("个人银行系统"); this.setSize(400, 500); this.setLocation(getMidDimension(new Dimension(400, 500))); getAppearance(); this.setVisible(true); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } /** * 获取屏幕的中间尺寸 * * @param d * Dimension类型 * @return 一个Point类型的参数 */ public static Point getMidDimension(Dimension d) { Point p = new Point(); Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); p.setLocation((dim.width - d.width) / 2, (dim.height - d.height) / 2); return p; } /** * 布局 * * @return Container */ public Container getAppearance() { Container container = this.getContentPane(); container.setLayout(new GridLayout(4, 0)); JLabel label1 = new JLabel("个人银行系统"); label1.setFont(new Font("楷体", Font.BOLD, 40)); JLabel label2 = new JLabel("账号:"); label2.setFont(new Font("楷体", Font.PLAIN, 15)); JLabel label3 = new JLabel("密码:"); label3.setFont(new Font("楷体", Font.PLAIN, 15)); userIdText = new JTextField(20); userIdText.addFocusListener(this); passwordText = new JPasswordField(20); passwordText.addFocusListener(this); JPanel jp1 = new JPanel(); JPanel jp2 = new JPanel(); JPanel jp3 = new JPanel(); JPanel jp4 = new JPanel(); jp1.add(label1); jp2.add(label2); jp2.add(userIdText); jp3.add(label3); jp3.add(passwordText); registerButton = new JButton("注册"); registerButton.addActionListener(this); registerButton.setFont(new Font("楷体", Font.BOLD, 15)); logInButton = new JButton("登录"); logInButton.addActionListener(this); logInButton.setFont(new Font("楷体", Font.BOLD, 15)); jp4.add(registerButton); jp4.add(logInButton); container.add(jp1); container.add(jp2); container.add(jp3); container.add(jp4); return container; } public void actionPerformed(ActionEvent e) { Object btn = e.getSource(); if (btn == registerButton) { new Register(); } else if (btn == logInButton) { String id = userIdText.getText().trim(); String password = new String(passwordText.getPassword()); Bank bank = new Bank(); if (id.equals("") || password.equals("")) { JOptionPane.showMessageDialog(null, "请输入账号和密码"); } else { String dPassword = bank.getPassword(id); if (password.equals(dPassword)) { userId = id; this.dispose(); new UserGUI(); } else { JOptionPane.showMessageDialog(this, "密码或用户名错误", "错误", JOptionPane.ERROR_MESSAGE); } } } } @Override public void focusGained(FocusEvent e) { Object text = e.getSource(); if (text == userIdText) { userIdText.setText(""); userIdText.setFont(new Font("宋体", Font.BOLD, 15)); } else if (text == passwordText) { passwordText.setText(""); } } @Override public void focusLost(FocusEvent e) { Object text = e.getSource(); if (text == userIdText) { if (userIdText.getText().equals("")) { userIdText.setText("请输入账号"); userIdText.setFont(new Font("楷体", Font.ITALIC, 15)); } } } }

    4
    1997
    132KB
    2011-03-14
    50
  • 山寨版千千静听(Java编写,采用最新的JDK)

    这是魔方千千静听的界面设计的,几乎可以以假乱真,但是功能还没有实现,希望各位大侠可以改进

    5
    93
    2.82MB
    2011-03-14
    10
  • JDK输入/输出流详解(非常细)

    包含了在开发中要用到的所有的IO流,很简单实用

    0
    61
    2.95MB
    2011-03-12
    0
  • 观察者模式详解(JDK中最重要的模式)

    里面包括了读观察者模式的详细介绍,这是JDK中的一个非常重要的模式。

    3
    125
    841KB
    2011-03-12
    10
  • Eclipse快捷键大全

    包括了Eclipse中常用的一些快捷键,对于初学者来说是非常实用的

    0
    27
    231KB
    2011-03-12
    3
  • 分享王者

    成功上传51个资源即可获取
关注 私信
上传资源赚积分or赚钱