好文档 - 专业文书写作范文服务资料分享网站

网上书店完整代码

天下 分享 时间: 加入收藏 我要投稿 点赞

附录 全部源代码

package class Connect { }

package class docMenuAction implements ActionListener {

RegisterFrame register = null; JPanel cusPanel = null; JPanel docPanel = null;

public docMenuAction(RegisterFrame register){

= register;

private static Connection con = null;

private static String url=\ private static String driver = \ private static String user = \ private static String pwd = \ public static Connection getConnection(){ }

public static void main(String[] args) { }

(); try {

(driver);

con = (url, user, pwd); \数据库连接成功!\

} catch (ClassNotFoundException e) {

\驱动加载失败!\

} catch (SQLException e) { }

return con;

\数据库连接失败!\

}

= ; = ;

public void actionPerformed(ActionEvent e) {

于用户搜索商品

public ArrayList getAllSellerGoods(){

ArrayList list = new ArrayList(); conn = (); try {

statement = ();

String sql = \ resultSet = (sql); while()){

Seller seller = new Seller(); (\ (\

Goods goods = new Goods(); (seller); (\ (\ (\ (\ (\ (\

2012-9-192012-9-192012-9-192012-9-19etImage());

(null); (null); (false);

etImage());

}

(600, 400); ; (null); (menuBar,;

setGoodsPanel(); ;

(goodsPanel,; ;

setSouthPanel(); setOrderPanel(); (southPanel,;

quals())){

(null, \请输入商品编号或商品数量!\

}else{

int id = ());

int num = ((String) ()); goods = (id);

if(null, \您确定要购买吗\

if()==0){

(null, \商品编号输入错误!\

}else{

if()

(null, \商品数量不足!\

}else{

()-num);

(goods);

OrderDao order = new OrderDao(); (goods, num); (null, \购买成功!\ setAr(); setOr();

}

});

}

}

}

}

();

}else{ }

etName(); }

private void setArNull(){ }

for(int i=0;i<;i++){ }

for(int j=0;j

ar[i][j]=\

}

ar[i][7]=().getAddress();

}

etName(); }

private void setOrNull(){ }

public static void main(String[] args) { }

BuyerFrame frame = new BuyerFrame(); (true);

for(int i=0;i<;i++){ }

for(int j=0;j

or[i][j]=\

}

or[i][3]=().getPrice(); or[i][4]=().getDiscount();

or[i][5]=().getPrice()*().getDiscount()*; or[i][6]=();

or[i][7]=().getName(); or[i][8]=().getAddress();

package class LoginFrame extends JFrame{

private JLabel userNameLabel = new JLabel(\用户名:\ private JLabel pwdLabel = new JLabel(\密 码:\ private JTextField useNameText = new JTextField();

网上书店完整代码

附录全部源代码packageclassConnect{}packageclassdocMenuActionimplementsActionListener{RegisterFrameregister=null;JPanelcusPa
推荐度:
点击下载文档文档为doc格式
3z0qi2br9j6msol1o4w75dq8n1si8z00uer
领取福利

微信扫码领取福利

微信扫码分享