手机管理系统源代码(虽然简单仅供大家参考)

时间:2012-03-05 15:44:01
【文件属性】:

文件名称:手机管理系统源代码(虽然简单仅供大家参考)

文件大小:3.33MB

文件格式:RAR

更新时间:2012-03-05 15:44:01

有好多功能没有实现多多谅解

一个简单的程序,4个人20天的心血.package zhuyemian; import java.awt.BorderLayout; import java.awt.Cursor; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JToolBar; import javax.swing.UIManager; import javax.swing.border.EtchedBorder; //import com.qhit.LandAppend; //import com.qhit.PasswordAmend; import Kehuxinxi.Kehumain; import Shouhoumain.Main; import Xiaoshouxinxi.Xiaoshoumain; import Chanpinxinxi.Chanpinmain; public class Zhuyemian extends JFrame implements Runnable{ MyPanel panel = new MyPanel(); JLabel label; public Zhuyemian() { super(); this.setIconImage(new ImageIcon("shoujitubiao.jpg").getImage());//在标题上的图片 this.setTitle("手机销售信息管理");//标题 this.setResizable(false);//大小可否改变 setSize(1024, 768); getContentPane().setLayout(null); getContentPane().add(panel); panel.setBounds(142, 37, 900, 738); panel.setLayout(null); final JMenuBar menuBar = new JMenuBar(); menuBar.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));//设置鼠标形状为默认的箭头 setJMenuBar(menuBar); final JMenu menujibencaozuo = new JMenu(); menujibencaozuo.setText("基本操作"); menuBar.add(menujibencaozuo); final JMenuItem newItemMenuItem_1 = new JMenuItem(); newItemMenuItem_1.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { new Kehumain(); } }); newItemMenuItem_1.setText("客户信息"); menujibencaozuo.add(newItemMenuItem_1); final JMenuItem newItemMenuItem = new JMenuItem(); newItemMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { new Chanpinmain(); } }); newItemMenuItem.setText("产品信息"); menujibencaozuo.add(newItemMenuItem); final JMenuItem newItemMenuItemxiaoshouxinxi = new JMenuItem(); newItemMenuItemxiaoshouxinxi.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { new Xiaoshoumain(); } }); newItemMenuItemxiaoshouxinxi.setText("销售信息"); menujibencaozuo.add(newItemMenuItemxiaoshouxinxi); final JMenuItem newItemMenuItemshouhouxinxi = new JMenuItem(); newItemMenuItemshouhouxinxi.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { new Main(); } }); newItemMenuItemshouhouxinxi.setText("售后信息"); menujibencaozuo.add(newItemMenuItemshouhouxinxi); final JMenu menugongju = new JMenu(); menugongju.setText("工具"); menuBar.add(menugongju); final JMenuItem newItemMenuItemjisuanqi = new JMenuItem(); newItemMenuItemjisuanqi.setText("计算器"); newItemMenuItemjisuanqi.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { Runtime.getRuntime().exec("calc.exe"); //设置运行任何系统可执行的程序----计算器 } catch (IOException e) { e.printStackTrace(); } } }); menugongju.add(newItemMenuItemjisuanqi); final JMenuItem newItemMenuItemjishiben = new JMenuItem(); newItemMenuItemjishiben.setText("记事本"); newItemMenuItemjishiben.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { Runtime.getRuntime().exec("notepad.exe"); //设置运行任何系统可执行的程序----记事本 } catch (IOException e) { e.printStackTrace(); } } }); menugongju.add(newItemMenuItemjishiben); final JMenu menu = new JMenu(); menu.setText("密码设置"); menuBar.add(menu); final JMenuItem newItemMenuItem_2 = new JMenuItem(); newItemMenuItem_2.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { // LandAppend ls = new LandAppend(); } }); newItemMenuItem_2.setText("注册管理员"); menu.add(newItemMenuItem_2); final JMenuItem newItemMenuItem_3 = new JMenuItem(); newItemMenuItem_3.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { // PasswordAmend frame = new PasswordAmend(null); } }); newItemMenuItem_3.setText("修改密码"); menu.add(newItemMenuItem_3); final JButton xiaishouxinxi = new JButton(); xiaishouxinxi.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { Xiaoshoumain xsm =new Xiaoshoumain(); } }); xiaishouxinxi.setIcon(SwingResourceManager.getIcon(Zhuyemian.class, "/xiaoshouxinxi.jpg")); xiaishouxinxi.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));//设置鼠标形状为默认的箭头 xiaishouxinxi.setBorder(new EtchedBorder(EtchedBorder.LOWERED)); xiaishouxinxi.setText(""); xiaishouxinxi.setBounds(0, 369, 136, 139); getContentPane().add(xiaishouxinxi); final JButton shouhouxinxi = new JButton(); shouhouxinxi.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { Main mm=new Main(); } }); shouhouxinxi.setIcon(SwingResourceManager.getIcon(Zhuyemian.class, "/shouhouxinxi.jpg")); shouhouxinxi.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));//设置鼠标形状为默认的箭头 shouhouxinxi.setBorder(new EtchedBorder(EtchedBorder.LOWERED)); shouhouxinxi.setText(""); shouhouxinxi.setBounds(0, 537, 136, 139); getContentPane().add(shouhouxinxi); final JButton chanpinxinxi = new JButton(); chanpinxinxi.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { Chanpinmain cpm=new Chanpinmain(); } }); chanpinxinxi.setBounds(0, 202, 136, 134); getContentPane().add(chanpinxinxi); chanpinxinxi.setBorder(new EtchedBorder(EtchedBorder.LOWERED)); chanpinxinxi.setIcon(SwingResourceManager.getIcon(Zhuyemian.class, "/chanpinxinxi.jpg")); chanpinxinxi.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));//设置鼠标形状为默认的箭头 chanpinxinxi.setText(""); final JButton kehuxinxi = new JButton(); kehuxinxi.setBounds(0, 37, 136, 134); getContentPane().add(kehuxinxi); kehuxinxi.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { new Kehumain(); } }); kehuxinxi.setIcon(SwingResourceManager.getIcon(Zhuyemian.class, "/kehuxinxi.jpg")); kehuxinxi.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));//设置鼠标形状为默认的箭头 kehuxinxi.setText(""); this.setCursor(new Cursor(Cursor.HAND_CURSOR));//设置鼠标形状为手型 label = new JLabel(); label.setText(""); label.setBounds(805, 0, 213, 36); getContentPane().add(label); final JToolBar toolBar = new JToolBar(); toolBar.setBounds(2, 1, 1016, 34); getContentPane().add(toolBar); final JButton Bangzhu= new JButton(); toolBar.add(Bangzhu); Bangzhu.setIcon(SwingResourceManager.getIcon(Zhuyemian.class, "/帮助.png")); Bangzhu.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));//设置鼠标形状为默认的箭头 Bangzhu.setText("帮助"); final JButton dayin = new JButton(); toolBar.add(dayin); dayin.setIcon(SwingResourceManager.getIcon(Zhuyemian.class, "/print.png")); dayin.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));//设置鼠标形状为默认的箭头 dayin.setText("打印"); final JButton tuichu = new JButton(); toolBar.add(tuichu); tuichu.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent arg0) { int aa=JOptionPane.showConfirmDialog(null, "你确认要退出吗?","确定",2); if(aa==JOptionPane.YES_OPTION){ dispose(); } } }); tuichu.setIcon(SwingResourceManager.getIcon(Zhuyemian.class, "/退出.png")); tuichu.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));//设置鼠标形状为默认的箭头 tuichu.setText("退出"); /*******************************************设定窗体的位置(居中)*******************************************/ Toolkit kit=Toolkit.getDefaultToolkit(); Dimension screen=kit.getScreenSize(); int height=screen.height;//当前屏幕高度 int width=screen.width;//当前屏幕宽度 this.setLocation((width-this.getWidth())/2,(height-this.getHeight())/3); this.setVisible(true); //启动多线程 Thread th =new Thread(this); th.start(); } /*******************************************时钟run方法*******************************************/ public void run() { while(true){ Date d =new Date(); SimpleDateFormat sdf =new SimpleDateFormat("yyyy-M-dd hh:mm:ss"); String str =sdf.format(d); label.setText(str); try { Thread.sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } public static void main(String[] args) { //改变观感 //org.jvnet.substance.SubstanceLookAndFeel try { UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel"); } catch (Exception e) { e.printStackTrace(); } new Zhuyemian(); } } /******************************************添加背景图片*******************************************/ class MyPanel extends JPanel{ //1.从写这个方法 public void paintComponent(Graphics g) { ImageIcon icon = new ImageIcon("zhujiemian.jpg"); g.drawImage(icon.getImage(), 0, 0, this.getWidth(), this.getHeight(), this); } }


【文件预览】:
手机销售管理系统
----0026.JPG(389KB)
----01.jpg(70KB)
----zhuyemian()
--------SwingResourceManager.java(5KB)
--------Zhuyemian.java(10KB)
----2008103122944176.png(4KB)
----tubiao.jpg(765B)
----chanpinxinxi.jpg(6KB)
----jindutiao.jpg(28KB)
----6.jpg(35KB)
----Kehuxinxi()
--------Kehumain.java(8KB)
--------Khfz.java(4KB)
--------X.java(6KB)
--------Gai.java(905B)
--------Zeng.java(7KB)
----Xiaoshouxinxi()
--------Xupdate.java(6KB)
--------Add.java(8KB)
--------Xiaoshoumain.java(7KB)
--------Xsfz.java(4KB)
----htMMpassword.png(23KB)
----jinsutiao()
--------Jindutiao.java(2KB)
--------Jindutiao.class(3KB)
----about.png(24KB)
----54ef749b327a29acc8eaf452.jpg(26KB)
----com()
--------qhit()
----zhujiemian.jpg(64KB)
----shouhouxinxi.jpg(7KB)
----admin.png(24KB)
----cancel.png(22KB)
----shoujitubiao.jpg(775B)
----退出.png(23KB)
----帮助.png(24KB)
----Thumbs.db(68KB)
----aaa()
--------Test.java(2KB)
----80cf22d313935e2d960a1613.jpg(60KB)
----shezhi.jpg(2KB)
----lib()
--------liquidlnf.jar(313KB)
----Chanpinxinxi()
--------Add.java(7KB)
--------Update.java(6KB)
--------Fengzhuanglei.java(5KB)
--------Chanpinmain.java(9KB)
--------sql.java(574B)
----1111.bmp(1.37MB)
----SQl備份()
--------telxiaoshou.mdf(3MB)
--------telxiaoshou_log.ldf(1024KB)
----telmain()
--------0026.JPG(389KB)
--------2008103122944176.png(4KB)
--------tubiao.jpg(765B)
--------Aqua20.jpg(5KB)
--------htMMpassword.png(23KB)
--------about.png(24KB)
--------zhujiemian.jpg(85KB)
--------admin.png(24KB)
--------.project(383B)
--------cancel.png(22KB)
--------shoujitubiao.jpg(775B)
--------退出.png(23KB)
--------帮助.png(24KB)
--------Thumbs.db(20KB)
--------.classpath(617B)
--------shezhi.jpg(2KB)
--------query.png(22KB)
--------kehuxinxi.jpg(1KB)
--------print.png(25KB)
--------0042.JPG(306KB)
--------Aqua23.jpg(4KB)
--------Aqua19.jpg(5KB)
--------2194s8f4iruj[1].jpg(28KB)
--------Aqua22.jpg(5KB)
----query.png(22KB)
----kehuxinxi.jpg(7KB)
----print.png(25KB)
----0042.JPG(306KB)
----Shouhoumain()
--------Xiu.java(5KB)
--------Main.java(9KB)
--------Zeng.java(9KB)
--------xiugai.java(1003B)
--------Shouhoufz.java(6KB)
----xiaoshouxinxi.jpg(7KB)
----2_10292N364.jpg(254KB)

网友评论