Source code

Add product in database

import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
import java.text.SimpleDateFormat;
import java.util.*;
import java.awt.event.*;

/**
* Title: Garments
* Description:
* Copyright: Copyright (c) 2008
* Company: Null
* @author Iqbal
* @version 1.0
*/

public class frmMr extends JFrame {
JPanel pnlMr = new JPanel();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JTextField txtMrno = new JTextField();
JLabel jLabel3 = new JLabel();
JTextField txtRdate = new JTextField();
JTextField txtSname = new JTextField();
JLabel jLabel4 = new JLabel();
JTextField txtLcno = new JTextField();
JPanel jPanel1 = new JPanel();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JTextField txtPname = new JTextField();
JTextField txtPrice = new JTextField();
JTextField txtQty = new JTextField();
JTextField txtTotal = new JTextField();
JLabel jLabel7 = new JLabel();
JLabel jLabel8 = new JLabel();
JLabel jLabel9 = new JLabel();
JButton cmdAddInlist = new JButton();
JButton cmdDeleteFromList = new JButton();
JScrollPane sp = new JScrollPane();
JTable table = new JTable();
JTextField txtGtotal = new JTextField();
JLabel jLabel10 = new JLabel();
JButton cmdRefresh = new JButton();
JButton cmdAdd = new JButton();
JButton cmdSearch = new JButton();
JButton cmdclose = new JButton();
DefaultTableModel model=new DefaultTableModel();
Client client=new Client();
ProductController mrcon;
SimpleDateFormat df=new SimpleDateFormat("dd-MMM-yyyy");
Date date = new Date();
long Slno=1;
JTextField cboPrid = new JTextField();
JButton Search = new JButton();
JFrame frm;

public frmMr() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
frmMr frmMr = new frmMr();
frmMr.setVisible(true);
}
private void jbInit() throws Exception {
frm=this;
mrcon=client.ConnectWithServer();
this.setTitle("Meterial Received");
this.setBounds(100,100,544,475);
this.getContentPane().setLayout(null);
pnlMr.setBorder(BorderFactory.createEtchedBorder());
pnlMr.setBounds(new Rectangle(4, 6, 502, 86));
pnlMr.setLayout(null);
jLabel1.setText("Meterial Receive No");
jLabel1.setBounds(new Rectangle(6, 11, 135, 29));
jLabel2.setText("Supplier Name");
jLabel2.setBounds(new Rectangle(4, 42, 110, 28));
txtMrno.setEditable(false);
txtMrno.setText("jTextField1");
txtMrno.setHorizontalAlignment(SwingConstants.RIGHT);
txtMrno.setBounds(new Rectangle(128, 12, 134, 24));
jLabel3.setText("Receive Data");
jLabel3.setBounds(new Rectangle(274, 11, 94, 24));
txtRdate.setBorder(BorderFactory.createLoweredBevelBorder());
txtRdate.setCaretColor(new Color(25, 0, 0));
txtRdate.setEditable(false);
txtRdate.setText("jTextField1");
txtRdate.setBounds(new Rectangle(359, 11, 123, 24));
txtRdate.setText(String.valueOf(df.format(date)));
txtSname.setEditable(false);
txtSname.setText("jTextField1");
txtSname.setBounds(new Rectangle(126, 41, 134, 24));
jLabel4.setText("L/C No");
jLabel4.setBounds(new Rectangle(275, 41, 77, 26));
txtLcno.setText("jTextField1");
txtLcno.setBounds(new Rectangle(359, 40, 123, 24));
jPanel1.setBorder(BorderFactory.createEtchedBorder());
jPanel1.setBounds(new Rectangle(6, 96, 502, 136));
jPanel1.setLayout(null);
jLabel5.setText("Item Id");
jLabel5.setBounds(new Rectangle(19, 5, 59, 25));
jLabel6.setText("Item Name");
jLabel6.setBounds(new Rectangle(118, 8, 70, 21));
txtPname.setBorder(BorderFactory.createLoweredBevelBorder());
txtPname.setEditable(false);
txtPname.setText("jTextField1");
txtPname.setBounds(new Rectangle(113, 30, 76, 25));
txtPrice.setText("jTextField2");
txtPrice.setHorizontalAlignment(SwingConstants.RIGHT);
txtPrice.setBounds(new Rectangle(200, 30, 76, 25));
txtQty.setText("jTextField3");
txtQty.setHorizontalAlignment(SwingConstants.RIGHT);
txtQty.setBounds(new Rectangle(291, 30, 76, 25));
txtTotal.setBorder(BorderFactory.createLoweredBevelBorder());
txtTotal.setEditable(false);
txtTotal.setText("jTextField4");
txtTotal.setHorizontalAlignment(SwingConstants.RIGHT);
txtTotal.setBounds(new Rectangle(382, 30, 76, 23));
jLabel7.setText("Price");
jLabel7.setBounds(new Rectangle(209, 8, 57, 20));
jLabel8.setText("Quentity");
jLabel8.setBounds(new Rectangle(295, 3, 68, 20));
jLabel9.setText("Total");
jLabel9.setBounds(new Rectangle(392, 5, 62, 19));
cmdAddInlist.setText("Add in List");
cmdAddInlist.setBounds(new Rectangle(82, 76, 109, 30));
cmdDeleteFromList.setText("Delete from List");
cmdDeleteFromList.setBounds(new Rectangle(191, 76, 130, 30));
sp.setBounds(new Rectangle(9, 247, 498, 129));
txtGtotal.setBorder(BorderFactory.createLoweredBevelBorder());
txtGtotal.setEditable(false);
txtGtotal.setText("0.0");
txtGtotal.setHorizontalAlignment(SwingConstants.RIGHT);
txtGtotal.setBounds(new Rectangle(400, 386, 99, 23));
jLabel10.setText("Grand total");
jLabel10.setBounds(new Rectangle(305, 385, 84, 25));
cmdRefresh.setMnemonic('R');
cmdRefresh.setText("Refresh");
cmdRefresh.setBounds(new Rectangle(12, 419, 90, 29));
cmdAdd.setMnemonic('A');
cmdAdd.setText("Add Record");
cmdAdd.setBounds(new Rectangle(102, 419, 106, 29));
cmdSearch.setMnemonic('S');
cmdSearch.setText("Search Record");
cmdSearch.setBounds(new Rectangle(209, 419, 129, 29));
cmdclose.setMnemonic('C');
cmdclose.setText("Close Window");
cmdclose.setBounds(new Rectangle(339, 419, 126, 29));
table.setEnabled(false);
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
model.addColumn("Slno");
model.addColumn("Item");
model.addColumn("Item name");
model.addColumn("Price");
model.addColumn("Quantity");
model.addColumn("total");

table.setModel(model);

table.getColumnModel().getColumn(0).setPreferredWidth(50);
table.getColumnModel().getColumn(1).setPreferredWidth(80);
table.getColumnModel().getColumn(2).setPreferredWidth(150);
table.getColumnModel().getColumn(3).setPreferredWidth(80);
table.getColumnModel().getColumn(4).setPreferredWidth(80);
table.getColumnModel().getColumn(5).setPreferredWidth(80);

cboPrid.setBackground(new Color(255, 253, 255));
cboPrid.setEditable(false);
cboPrid.setBounds(new Rectangle(7, 31, 59, 22));
Search.setBounds(new Rectangle(77, 31, 27, 24));
Search.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
Search_actionPerformed(e);
}
});
this.getContentPane().add(pnlMr, null);
pnlMr.add(jLabel1, null);
pnlMr.add(txtMrno, null);
pnlMr.add(jLabel3, null);
pnlMr.add(txtRdate, null);
pnlMr.add(jLabel2, null);
pnlMr.add(txtSname, null);
pnlMr.add(jLabel4, null);
pnlMr.add(txtLcno, null);
this.getContentPane().add(sp, null);
this.getContentPane().add(txtGtotal, null);
this.getContentPane().add(jLabel10, null);
this.getContentPane().add(cmdRefresh, null);
this.getContentPane().add(cmdAdd, null);
this.getContentPane().add(cmdSearch, null);
this.getContentPane().add(cmdclose, null);
this.getContentPane().add(jPanel1, null);
jPanel1.add(jLabel5, null);
jPanel1.add(cmdDeleteFromList, null);
jPanel1.add(cmdAddInlist, null);
jPanel1.add(txtPname, null);
jPanel1.add(jLabel9, null);
jPanel1.add(txtTotal, null);
jPanel1.add(jLabel8, null);
jPanel1.add(txtQty, null);
jPanel1.add(jLabel7, null);
jPanel1.add(txtPrice, null);
jPanel1.add(jLabel6, null);
jPanel1.add(cboPrid, null);
jPanel1.add(Search, null);
sp.getViewport().add(table, null);
}

void Search_actionPerformed(ActionEvent e) {
DlgSearch obj=new DlgSearch(frm,"Item Search",true);
obj.setVisible(true);
int row =obj.table.getSelectedRow();
boolean St=obj.State;
if((row>=0)&&(St))
{
cboPrid.setText(String.valueOf(obj.model.getValueAt(row,0)));
txtPname.setText(String.valueOf(obj.model.getValueAt(row,1)));
}
else
{
cboPrid.setText("");
txtPname.setText("");
}
}
}
TOTAL :
SHIPPING FEE :
GRAND TOTAL :

Thank . We received your oder.

Payment Method
Order ID
Date order
Total

Please make your payment directly via UPI transfer by scaning our below QR codes. Use your Order ID as the payment reference. Your order won't be shipped until the funds have cleared in our account.

Please make your payment directly into our bank account. Use your Order ID as the payment reference. Your order won't be shipped until the funds have cleared in our account.

Order detail:

Product Name:
Quantity:
Size:
Price:

Customer's detail:

Full name:
Email:
Phone number:
Postcode:
Address:
City:
State:
Country:

Contact Form

Name

Email *

Message *