import com.cloudgarden.layout.AnchorLayout;
import javax.swing.*;
import com.cloudgarden.layout.AnchorConstraint;
import javax.swing.table.*;
import java.awt.event.*;
import java.sql.*;
/**
* This code was generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* *************************************
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED
* for this machine, so Jigloo or this code cannot be used legally
* for any corporate or commercial purpose.
* *************************************
*/
public class JFrame_saler extends javax.swing.JFrame {
private String log_eid;//记录登陆者的ID号
private float every_due_money = 0;//一次交易中每种商品总共要付的钱
private Float due_money = new Float(0);//应付的金额
private Float back_money = new Float(0);//应找的钱
private static final long serialVersionUID = 1L;
private JLabel jLabel_title;
private JLabel jLabel_in_money;
private JButton jButton_back;
private JButton jButton_cancel;
private JButton jButton_commit;
private JButton jButton_add;
private JTable jTable_data;
private JScrollPane jScrollPane_data;
private JButton jButton1;
private JTextField jTextField_all_price;
private JLabel jLabel2_all_price;
private JLabel jLabel1;
private JTextField jTextField_back_money;
private JLabel jLabel_back_money;
private JTextField jTextField_in_money;
private JLabel jLabel_barcode;
private JLabel jLabel_num;
private JTextField jTextField_num;
private JTextField jTextField_commodity;
private JTextField jTextField_price;
private JTextField jTextField_name;
private JTextField jTextField_barcode;
private JLabel jLabel_price;
private JLabel jLabel5;
private JLabel jLabel4;
private JLabel jLabel3;
private JLabel jLabel2;
private JLabel jLabel_guige;
private JLabel jLabel_name;
private Query q;
public JFrame_saler() {
setTitle("销售系统");
initGUI();
q = new Query();
}
private void initGUI() {
try {
setVisible(true);
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
this.getContentPane().setBackground(new java.awt.Color(241,156,235));
AnchorLayout thisLayout = new AnchorLayout();
this.getContentPane().setLayout(thisLayout);
this.setLocation(new java.awt.Point(240, 50));
this.setIgnoreRepaint(true);
//返回主界面
{
jLabel5 = new JLabel();
this.getContentPane().add(
jLabel5,
new AnchorConstraint(
209,
885,
253,
841,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jLabel5.setText("(\u5143)");
jLabel5.setPreferredSize(new java.awt.Dimension(35, 29));
jLabel5.setFont(new java.awt.Font("Dialog",1,16));
}
{
jLabel4 = new JLabel();
this.getContentPane().add(
jLabel4,
new AnchorConstraint(
487,
889,
532,
846,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jLabel4.setText("(\u5143)");
jLabel4.setPreferredSize(new java.awt.Dimension(34, 30));
jLabel4.setFont(new java.awt.Font("Dialog",1,16));
}
{
jLabel3 = new JLabel();
this.getContentPane().add(
jLabel3,
new AnchorConstraint(
398,
889,
442,
844,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jLabel3.setText("(\u5143)");
jLabel3.setPreferredSize(new java.awt.Dimension(36, 29));
jLabel3.setFont(new java.awt.Font("Dialog",1,16));
}
{
jLabel2 = new JLabel();
this.getContentPane().add(
jLabel2,
new AnchorConstraint(
304,
888,
347,
841,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jLabel2.setText("(\u5143)");
jLabel2.setPreferredSize(new java.awt.Dimension(37, 29));
jLabel2.setFont(new java.awt.Font("Dialog",1,16));
}
{
jScrollPane_data = new JScrollPane();
this.getContentPane().add(
jScrollPane_data,
new AnchorConstraint(
679,
977,
991,
23,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jScrollPane_data.setPreferredSize(new java.awt.Dimension(746, 225));
jScrollPane_data.setAutoscrolls(true);
jScrollPane_data.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
{
Object rowdata[][]={{null,null,null,null,null}};
String names[]={"条形码", "商品名称","零售价","购买数量","商品规格" };
TableModel jTable_dataModel = new DefaultTableModel(new String[][] {{"条形码","商品名称","零售价",
"购买数量","商品规格"}},new String[]{"", "","","","" });
jTable_data = new JTable(rowdata,names);
jScrollPane_data.setViewportView(jTable_data);
jTable_data.setColumnSelectionAllowed(true);
jTable_data.setModel(jTable_dataModel);
jTable_data.setEnabled(false);
}
}
{
jButton1 = new JButton();
this.getContentPane().add(
jButton1,
new AnchorConstraint(
611,
711,
662,
605,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jButton1.setText("\u8fd4\u56de");
jButton1.setPreferredSize(new java.awt.Dimension(84, 34));
jButton1.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
dispose();//关闭本窗口
System.gc();
logon l = new logon();
l.setVisible(true);
}
});
}
{
jTextField_all_price = new JTextField();
this.getContentPane().add(
jTextField_all_price,
new AnchorConstraint(
395,
839,
445,
639,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jTextField_all_price.setPreferredSize(new java.awt.Dimension(158, 33));
jTextField_all_price.setEditable(false);
}
{
jLabel2_all_price = new JLabel();
this.getContentPane().add(
jLabel2_all_price,
new AnchorConstraint(
397,
618,
443,
524,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jLabel2_all_price.setText("\u5e94\u6536\u91d1\u989d");
jLabel2_all_price.setPreferredSize(new java.awt.Dimension(74, 31));
jLabel2_all_price.setFont(new java.awt.Font("Dialog",1,16));
}
{
jLabel1 = new JLabel();
this.getContentPane().add(
jLabel1,
new AnchorConstraint(
209,
500,
256,
452,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jLabel1.setText("(5\u4f4d)");
jLabel1.setPreferredSize(new java.awt.Dimension(38, 31));
jLabel1.setFont(new java.awt.Font("Dialog",1,16));
}
{
//退出button
jButton_back = new JButton();
this.getContentPane().add(
jButton_back,
new AnchorConstraint(
610,
860,
661,
750,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL,
AnchorConstraint.ANCHOR_REL));
jButton_back.setText("\u9000\u51fa");
jButton_back.setPreferredSize(new java.awt.Dimension(87, 34));
jButton_back.addActionListener(new ActionListener(){
public void actionPerfo
- 1
- 2
- 3
- 4
- 5
- 6
前往页