91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 40KB
    文件類型: .zip
    金幣: 2
    下載: 1 次
    發布日期: 2021-05-21
  • 語言: Java
  • 標簽: msql??GUI??java??

資源簡介

該系統基于mysql+eclipse+jdk1.6(內部有注釋,系統完整) 實現3張表的增刪查改操作 簡單GUI操作界面 適合課程設計

資源截圖

代碼片段和文件信息

package?com.system.main;

import?java.awt.Container;
import?java.awt.event.ActionEvent;
import?java.awt.event.ActionListener;

import?javax.swing.JButton;
import?javax.swing.Jframe;
import?javax.swing.JLabel;
import?javax.swing.JOptionPane;
import?javax.swing.JPasswordField;
import?javax.swing.JTextField;

import?com.system.main.Login.ButtonListener;
import?com.system.sql.Product;
import?com.system.sql.User;

public?class?AddPro?extends?Jframe{
private?JButton?addbtn;?
private?JButton?changebtn;?
//用戶與密碼標簽
private?JLabel?lab1lab2lab3lab4;
//4個輸入框
JTextField?pname;?
JTextField?pnum;
JTextField?pprice;
JTextField?pclass;

public?AddPro(){??
this.init();
}?

public?void?init()?{
Container?con=super.getContentPane();//頂級容器??
con.setLayout(null);

lab1=new?JLabel(“商品名:“);??
lab1.setBounds(5510060);
pname=new?JTextField(20);??
pname.setBounds(502020030);??

lab2=new?JLabel(“數????量:“);??
lab2.setBounds(53510060);??
pnum=new?JTextField(20);??
pnum.setBounds(505020030);??

lab3=new?JLabel(“價????格:“);??
lab3.setBounds(56510060);
pprice=new?JTextField(20);??
pprice.setBounds(508020030);

lab4=new?JLabel(“種????類:“);??
lab4.setBounds(59510060);
pclass=new?JTextField(20);??
pclass.setBounds(5011020030);?

addbtn=new?JButton(“添加“);??
addbtn.setBounds(301607030);??
changebtn=new?JButton(“更改“);??
changebtn.setBounds(1301607030);??
??

//依次添加組件
con.add(lab1);??
con.add(lab2);
con.add(lab3);
con.add(lab4);
con.add(pname);??

con.add(pnum);?
con.add(pprice);
con.add(pclass);
con.add(addbtn);
con.add(changebtn);


//設置屬性
super.settitle(“添加商品“);
super.setSize(350?272);
super.setResizable(false);
super.setDefaultCloseOperation(super.DISPOSE_ON_CLOSE);
super.setVisible(true);??

//給2個按鈕添加監聽
ButtonListener?listener1?=?new?ButtonListener();??
addbtn.addActionListener(listener1);??
changebtn.addActionListener(listener1);?
}

//事件監聽器接口??
class?ButtonListener?implements?ActionListener{??
public?void?actionPerformed(ActionEvent?e){??
object?source=e.getSource();??
Product?product?=?new?Product();
if(source?instanceof?JButton?){
JButton?jb=(JButton)source;//按鈕??
String?txt=jb.getText();??
String?name?=?pname.getText();
int?num?=?Integer.parseInt(pnum.getText());
int?price?=?Integer.parseInt(pprice.getText());
String?pclazz?=?pclass.getText();

if(txt.equals(“添加“)){?
if(!(name.equals(““)&&pnum.getText().equals(““)&&pprice.getText().equals(““)&&
pclazz.equals(““)))?{
if(product.addPro(namenumpricepclazz))?{
JOptionPane.showMessageDialog(null?“添加成功!“);
}
}else?{
JOptionPane.showMessageDialog(null?“添加失敗!“);
}

}else?if(txt.equals(“更改“)){??
if(!(name.equals(““)&&pnum.getText().equals(““)&&pprice.getText().equ

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-07-19?17:01??GUI的超市管理系統(mysql+java)\
?????文件????????1844??2018-07-19?16:53??GUI的超市管理系統(mysql+java)\market.sql
?????目錄???????????0??2018-07-19?16:54??GUI的超市管理系統(mysql+java)\product_system\
?????文件?????????384??2018-07-01?15:10??GUI的超市管理系統(mysql+java)\product_system\.classpath
?????文件?????????390??2018-07-01?01:46??GUI的超市管理系統(mysql+java)\product_system\.project
?????目錄???????????0??2018-07-19?16:54??GUI的超市管理系統(mysql+java)\product_system\.settings\
?????文件?????????718??2018-07-19?16:41??GUI的超市管理系統(mysql+java)\product_system\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\
?????目錄???????????0??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\
?????目錄???????????0??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\
?????目錄???????????0??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\
?????文件????????2136??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\AddPro$ButtonListener.class
?????文件????????2220??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\AddPro.class
?????文件????????2246??2018-07-19?16:59??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Login$ButtonListener.class
?????文件????????2352??2018-07-19?16:59??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Login.class
?????文件?????????826??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Product_Management$1.class
?????文件????????1481??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Product_Management$2.class
?????文件????????1924??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Product_Management$3.class
?????文件????????1208??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Product_Management$4.class
?????文件????????1214??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Product_Management$5.class
?????文件?????????826??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Product_Management$6.class
?????文件????????1298??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Product_Management$7.class
?????文件????????1802??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Product_Management$8.class
?????文件????????3956??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Product_Management.class
?????文件????????2222??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Regist$ButtonListener.class
?????文件????????2390??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\main\Regist.class
?????目錄???????????0??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\sql\
?????文件????????2287??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\sql\Loj.class
?????文件????????4297??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\sql\Product.class
?????文件????????1675??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\sql\User.class
?????目錄???????????0??2018-07-19?16:56??GUI的超市管理系統(mysql+java)\product_system\bin\com\system\sqlserverConn\
............此處省略16個文件信息

評論

共有 條評論