上一页 1 ··· 4 5 6 7 8

2013年6月8日

SWING毕业设计-人事管理系统

摘要: 惯例广告一发,对于初学真,真的很有用www.java1234.com,去试试吧! 阅读全文

posted @ 2013-06-08 21:14 鱼东鱼 阅读(313) 评论(0) 推荐(0) 编辑

Swing关闭窗口前提示用户

摘要: 惯例广告一发,对于初学真,真的很有用www.java1234.com,去试试吧!int result = JOptionPane.showConfirmDialog(null, "你确定要退出本窗口不?","Information", JOptionPane.YES_NO_OPTION);if (result == JOptionPane.YES_NO_OPTION) {this.dispose();} 阅读全文

posted @ 2013-06-08 20:59 鱼东鱼 阅读(205) 评论(0) 推荐(0) 编辑

2013年6月3日

Swing学习小结

摘要: www.java1234.com1:对Swing控件的使用:JFrame 可以加载 JInternalFrameRadio Button 要加载到 buttongroup 方可使用JCombox里面直接加进去一个对象(调用对象的toString方法)table的使用:private void filltable(Book book) { Connection con = null; DefaultTableModel dtm = (DefaultTableModel) this.bookType.getModel(); dtm.setRowCount(... 阅读全文

posted @ 2013-06-03 09:28 鱼东鱼 阅读(179) 评论(1) 推荐(0) 编辑

2013年5月29日

查询数据库注意点:

摘要: public ResultSet getAddress(Connection con,Address address) throws Exception{ StringBuffer sb = new StringBuffer("select * from list"); if(StringUtil.isNotNull(address.getAddlocal())){ sb.append(" and address like BINARY '%"+ address.getAddlocal()+"%'"); }else{ 阅读全文

posted @ 2013-05-29 09:15 鱼东鱼 阅读(173) 评论(0) 推荐(0) 编辑

Swing0528笔记

摘要: 1:table表单清空:DefaultTableModel dtm = (DefaultTableModel) this.bookType.getModel();dtm.setRowCount(0);2:combox 注意有时候默认选中的话最好前面加个判断.getItemCount()>02:多表查询 1 public ResultSet bookList(Connection con,Book book) throws Exception{ 2 StringBuffer sb = new StringBuffer("select * from t_book b ,t_boo. 阅读全文

posted @ 2013-05-29 00:08 鱼东鱼 阅读(156) 评论(0) 推荐(0) 编辑

2013年5月26日

Swing0526笔记

摘要: 1:学习了怎么两张表的主外键关联。 用SQLyogEnt工具的架构设计器2:JRadioButton的常用方法: .isSelected() .setSelected(true) 注意:要在JRadioButton的buttongroup属性里面添加进去。3:JComboBox的常用方法: .setSelectedIndex(0) 直接添加一个对象:.addItem(type) 实际是调用该对象的toString()方法,所以要重写这个方法。 .getSelectedItem()返回添加的对象 阅读全文

posted @ 2013-05-26 22:05 鱼东鱼 阅读(139) 评论(0) 推荐(0) 编辑

2013年5月25日

Swing0525笔记

摘要: 1:table的鼠标点击动作:table有一个getSelectedRow()的方法返回当前选中行数getValueAt(row, column);调用返回的行数,后面的参数代表table的哪一列 int row = this.bookTypeManagerTable.getSelectedRow(); this.idTxt.setText((String) bookTypeManagerTable.getValueAt(row, 0)); this.bookManagerTxt.setText((String) bookTypeManagerTable.getValueAt( r... 阅读全文

posted @ 2013-05-25 22:38 鱼东鱼 阅读(139) 评论(0) 推荐(0) 编辑

2013年5月24日

Swing0524笔记

摘要: table的用法: 处理数据模型 DefaultTableModel dtm = (DefaultTableModel) this.bookTypeManagerTable.getModel(); Vector v = new Vector(); v.add(); dtm.addRow(v);查询的屌丝代码:StringBuffer sb = new StringBuffer("select * from t_booktype");if(StringUtil.isNotNull(type.getTypeName())){ sb.append(" and bookT 阅读全文

posted @ 2013-05-24 23:52 鱼东鱼 阅读(150) 评论(0) 推荐(0) 编辑

2013年5月23日

Swing0523笔记

摘要: 面向对象的思想:分成四块:1:用户显示界面模块(view) 设置默认显示居中间:this.setLocationRelativeTo(null); 设置默认显示最大化:this.setExtendedState(MAXIMIZED_BOTH); 判断为空 "".equals(str) || str==null 小弹窗口提示:①JOptionPane.showMessageDialog ②JOptionPane.showConfirmDialog(null, "是否关闭系统");返回0代表确定 数据处理后不要忘记关闭数据库(对于关闭一个对象前,先判断是否为 阅读全文

posted @ 2013-05-23 23:01 鱼东鱼 阅读(153) 评论(2) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8

导航