您好,欢迎光临本网站![请登录][注册会员]  
文件名称: java+通讯录
  所属分类: Java
  开发工具:
  文件大小: 21kb
  下载次数: 0
  上传时间: 2014-06-30
  提 供 者: hech*****
 详细说明: java 通讯录 可以用来做课程设计 代码 import java.awt.*; import javax.swing.*; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumn; import java.awt.event.*; import java.sql.*; import java.util.Vector; import java.sql.ResultSet; //******************************定义主窗口******************************** class Interface extends JFrame { JLabel txl=new JLabel("通讯录记录如下:"); JButton bc=new JButton("保存"); JButton sx=new JButton("刷新"); JButton tc=new JButton("退出"); JButton tj=new JBut ton("添加"); JButton sc=new JButton("删除"); JButton cz=new JButton("查找"); JMenuBar bar=new JMenuBar(); JMenu wj=new JMenu("文件"); JMenu bj=new JMenu("编辑"); JMenu bz=new JMenu("帮助"); JMenuItem barbc = new JMenuItem("保存"); JMenuItem bartc = new JMenuItem("退出"); JMenuItem bartj = new JMenuItem("添加"); JMenuItem barsy = new JMenuItem("如何使用?"); JMenuItem bargy = new JMenuItem("关于"); JMenuItem barsc = new JMenuItem("删除"); JMenuItem barcz = new JMenuItem("查找"); JMenuItem barlj = new JMenuItem("测试与数据库连接"); JMenu barpx = new JMenu("排序"); JMenuItem barpxid = new JMenuItem("按序号排序"); JMenuItem barpxxm = new JMenuItem("按姓名排序"); TableColumn column=new TableColumn(); static Object PersonInfo[][]={}; static String head[] = {"ID","姓名","性别","电话","QQ","家庭住址"}; static DefaultTableModel model = new DefaultTableModel(PersonInfo,head); static JTable table=new JTable(model); //****************************初始化主窗口******************************* public Interface() { setLayout(null); wj.add(barbc); wj.addSeparator(); wj.add(barlj); wj.addSeparator(); wj.add(barcz); wj.addSeparator(); wj.add(bartc); bj.add(bartj); bj.add(barsc); bj.addSeparator(); bj.add(barpx); barpx.add(barpxid); barpx.add(barpxxm); bz.add(barsy); bz.addSeparator(); bz.add(bargy); bar.add(wj); bar.add(bj); bar.add(bz); this.setJMenuBar(bar); txl.setForeground(Color.BLUE); this.add(txl); txl.setFont(new Font("华文彩云",Font.BOLD,30)); txl.setBounds(new Rectangle(180,10,350,40)); //**************************添加网格****************************** table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); table.setGridColor(Color.CYAN); table.setSelectionBackground(Color.YELLOW); table.setForeground(Color.RED); JScrollPane jsp=new JScrollPane(table); jsp.setBounds(new Rectangle(45,60,500,405)); this.add(jsp); ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: 通讯录+java
 输入关键字,在本站1000多万海量源码库中尽情搜索: