0% found this document useful (0 votes)
27 views

OOSE Word

Uploaded by

sangeetha10703
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

OOSE Word

Uploaded by

sangeetha10703
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

STOCK MAINTENANCE SYSTEM

AIM:

The aim is to create a robust Java application for managing orders in a retail system,
facilitating efficient customer and product management that is Stock Maintenance System
in NetBeans IDE using SQLite database.

PROBLEM STATEMENT:

Develop a Java application for managing orders in a retail system, allowing users to add
customers, view products, add products to a cart, and save order details. The application
should feature customer and product management functionalities, along with cart
management for adding products with quantity. Admin tasks include setting up the
database schema, implementing error handling, ensuring a user-friendly UI/UX design, and
conducting thorough testing to ensure reliability.
CLASS DIAGRAM:
ACTIVITY DIAGRAM:
SEQUENCE DIAGRAM:
COLLABORATION DIAGRAM:

STATE DIAGRAM:
SOURCE CODE:

Connection Provider.java:

package dao;
import java.sql.*;
public class ConnectionProvider {
public static Connection getCon(){
try{
Class.forName("org.sqlite.JDBC");
Connection con = DriverManager.getConnection("jdbc:sqlite:F:\\SQLite\\stock.db");
return con;
}
catch(Exception e){
System.out.println(e);
return null;
}
}
}

Login.java:

import dao.ConnectionProvider;
import javax.swing.JOptionPane;
import java.sql.*;
public class Login extends javax.swing.JFrame {
public Login() {
initComponents();
setLocationRelativeTo(null);
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
jPasswordField1 = new javax.swing.JPasswordField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N


jLabel1.setText("Welcome");
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1150,
100, -1, -1));

jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jLabel2.setText("Email");
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1040,
170, 113, -1));

jTextField1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


getContentPane().add(jTextField1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(1040, 210, 261, -1));

jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jLabel3.setText("Password");
getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(1040,
260, -1, -1));

jPasswordField1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


getContentPane().add(jPasswordField1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(1040, 300, 261, -1));

jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/login.png"))); // NOI18N
jButton1.setText("Login");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1040,
350, 261, -1));

jButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jButton2.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/close.png"))); // NOI18N
jButton2.setText("Close");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1040,
410, 261, -1));

jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/login-
background.PNG"))); // NOI18N
getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -
1));

pack();
}// </editor-fold>

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
int a = JOptionPane.showConfirmDialog(null, "Do you want to close the
application?","Select",JOptionPane.YES_NO_OPTION);
if(a == 0){
System.exit(0);
}
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String e = jTextField1.getText();
String pass = jPasswordField1.getText();

int temp = 0;
try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from appUser where email='"+e+"' and
password='"+pass+"' and status='Active'");
while(rs.next()){
temp = 1;
setVisible(false);
new Home(rs.getString("userRole")).setVisible(true);
}
if(temp == 0){
JOptionPane.showMessageDialog(null, "Incorrect email or oassword");
}
}
catch(Exception e1){
JOptionPane.showMessageDialog(null ,e1);
}
}

public static void main(String args[]) {


/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE
, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE
, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE
, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE
, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Login().setVisible(true);
}
});
}

// Variables declaration - do not modify


private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JPasswordField jPasswordField1;
private javax.swing.JTextField jTextField1;
// End of variables declaration
}

Tables.java:

package dao;
import java.sql.*;
import javax.swing.JOptionPane;
public class tables {
public static void main(String args[]){
Connection con = null;
Statement st = null;
try{
con = ConnectionProvider.getCon();
st = con.createStatement();
st.executeUpdate("CREATE TABLE User(appuser_pk INTEGER primary key
AUTOINCREMENT, userRole varchar(50), name varchar(100), mobileNumber varchar(50),
email varchar(200), password varchar(50), address varchar(200), status varchar(50)");
st.executeUpdate("INSERT INTO User VALUES (1,'SuperAdmin', 'Super Admin',
'12345', 'superadmin@testemail.com', '123', 'India', 'Active')");
st.executeUpdate("CREATE TABLE category (category_pk INTEGER primary key
AUTOINCREMENT, name varchar(200))");
st.executeUpdate("CREATE TABLE products (product_pk INTEGER primary key
AUTOINCREMENT, name varchar(200), quantity int, price int, description varchar(200),
category_fk int)");
st.executeUpdate("CREATE TABLE customer (customer_pk INTEGER primary key
AUTOINCREMENT, name varchar(200), mobileNumber varchar(50), email varchar(200))");
JOptionPane.showMessageDialog(null,"Table created successfully");

}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
finally{
try{
con.close();
st.close();
}
catch(Exception e){}
}
}
}
Home.java:

import javax.swing.JOptionPane;
public class Home extends javax.swing.JFrame {
public Home() {
initComponents();
}

public Home(String role) {


initComponents();
setLocationRelativeTo(null);
if(role.equals("Admin")){
btnuser.setVisible(false);
}
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

btnuser = new javax.swing.JButton();


jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jButton7 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
pack();
}// </editor-fold>

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
new ManageCategory().setVisible(true);
}

private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
int a = JOptionPane.showConfirmDialog(null,"Do you want to log
out","Select",JOptionPane.YES_NO_OPTION);
if(a == 0){
setVisible(false);
new Login().setVisible(true);
}
}

private void btnuserActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
new ManageUser().setVisible(true);
}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
new ManageProduct().setVisible(true);
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
new ManageCustomer().setVisible(true);
}

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
new ManageOrder().setVisible(true);
}

public static void main(String args[]) {


/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE
, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE
, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE
, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE
, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Home().setVisible(true);
}
});
}

// Variables declaration - do not modify


private javax.swing.JButton btnuser;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JButton jButton7;
private javax.swing.JLabel jLabel1;
// End of variables declaration
}

ManageUser.java:

import dao.ConnectionProvider;
import java.awt.Color;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.JOptionPane;
import java.sql.*;
public class ManageUser extends javax.swing.JFrame {
private int appuserPK = 0;
public ManageUser() {
initComponents();
setLocationRelativeTo(null);
}

private boolean validateFields(String formType){


if(formType.equals("edit") && !txtname.getText().trim().isEmpty()
&& !txtmobile.getText().trim().isEmpty()
&& !txtemail.getText().trim().isEmpty()&& !txtaddress.getText().trim().isEmpty()){
return false;
}
else if(formType.equals("new") && !txtname.getText().trim().isEmpty()
&& !txtmobile.getText().trim().isEmpty() && !txtemail.getText().trim().isEmpty()
&& !txtaddress.getText().trim().isEmpty() && !txtpassword.getText().trim().isEmpty()){
return false;
}
else{
return true;
}
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jScrollPane1 = new javax.swing.JScrollPane();
tableuser = new javax.swing.JTable();
jLabel2 = new javax.swing.JLabel();
txtname = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
txtmobile = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
txtemail = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
txtaddress = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
comboboxstatus = new javax.swing.JComboBox<>();
txtpassword = new javax.swing.JTextField();
jLabel7 = new javax.swing.JLabel();
btnsave = new javax.swing.JButton();
btnupdate = new javax.swing.JButton();
}
});
getContentPane().add(btnreset, new org.netbeans.lib.awtextra.AbsoluteConstraints(657,
518, -1, -1));

btnclose.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N


btnclose.setText("Close");
btnclose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btncloseActionPerformed(evt);
}
});
getContentPane().add(btnclose, new org.netbeans.lib.awtextra.AbsoluteConstraints(749,
518, -1, -1));

label.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/All_page_Background.png"))); //
NOI18N
getContentPane().add(label, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -20, -1,
640));

pack();
}// </editor-fold>

private void formComponentShown(java.awt.event.ComponentEvent evt) {


// TODO add your handling code here:
DefaultTableModel model = (DefaultTableModel) tableuser.getModel();
try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from User where userRole = 'Admin'");
while(rs.next()){
model.addRow(new
Object[]{rs.getString("appuser_pk"),rs.getString("name"),rs.getString("mobileNumber"),rs.getSt
ring("email"),rs.getString("address"),rs.getString("status")});
}
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e);
}
btnupdate.setEnabled(false);
}

private void btnsaveActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String name = txtname.getText();
String mobilenumber = txtmobile.getText();
String email = txtemail.getText();
String password = txtpassword.getText();
String address = txtaddress.getText();
String status = (String) comboboxstatus.getSelectedItem();

if(validateFields("new")){
JOptionPane.showMessageDialog(null, "All fields are required");
}
else{
try{
Connection con = ConnectionProvider.getCon();
PreparedStatement pt = con.prepareStatement("insert into User
(userRole,name,mobileNumber,email,password,address,status) values('Admin',?,?,?,?,?,?)");
pt.setString(1, name);
pt.setString(2, mobilenumber);
pt.setString(3, email);
pt.setString(4, password);
pt.setString(5, address);
pt.setString(6, status);
pt.executeUpdate();
JOptionPane.showMessageDialog(null, "User added successfully");
setVisible(false);
new ManageUser().setVisible(true);
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
}
}

private void tableuserMouseClicked(java.awt.event.MouseEvent evt) {


// TODO add your handling code here:
int index = tableuser.getSelectedRow();
TableModel model = tableuser.getModel();

String id = model.getValueAt(index, 0).toString();


appuserPK = Integer.parseInt(id);
String name = model.getValueAt(index, 1).toString();
txtname.setText(name);

String mobileNumber = model.getValueAt(index, 2).toString();


txtmobile.setText(mobileNumber);

String email = model.getValueAt(index, 3).toString();


txtemail.setText(email);

String address = model.getValueAt(index, 4).toString();


txtaddress.setText(address);

String status = model.getValueAt(index, 5).toString();


comboboxstatus.removeAllItems();
if(status.equals("Active")){
comboboxstatus.addItem("Active");
comboboxstatus.addItem("Inactive");
}
else{
comboboxstatus.addItem("Inactive");
comboboxstatus.addItem("Active");
}

txtpassword.setEditable(false);
txtpassword.setBackground(Color.DARK_GRAY);

btnsave.setEnabled(false);
btnupdate.setEnabled(true);
}

private void btnupdateActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String name = txtname.getText();
String mobilenumber = txtmobile.getText();
String email = txtemail.getText();
String address = txtaddress.getText();
String status = (String) comboboxstatus.getSelectedItem();

if(validateFields("edit")){
JOptionPane.showMessageDialog(null, "All fields are required");
}
else{
try{
Connection con = ConnectionProvider.getCon();
PreparedStatement pt = con.prepareStatement("update user set name=?,
mobileNumber=?, email=?, address=?, status=? where appuser_pk=?");
pt.setString(1, name);
pt.setString(2, mobilenumber);
pt.setString(3, email);
pt.setString(4, address);
pt.setString(5, status);
pt.setInt(6, appuserPK);
pt.executeUpdate();
JOptionPane.showMessageDialog(null, "User updated successfully");
setVisible(false);
new ManageUser().setVisible(true);
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
}
}

private void btnresetActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
setVisible(false);
new ManageUser().setVisible(true);
}

private void btncloseActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
setVisible(false);

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(ManageUser.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(ManageUser.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(ManageUser.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(ManageUser.class.getName()).log(java.util.logging.Level.SE
VERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ManageUser().setVisible(true);
ManageCategory.java:

import dao.ConnectionProvider;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import java.sql.*;
public class ManageCategory extends javax.swing.JFrame {
private int categoryPK = 0;
public ManageCategory() {
initComponents();
setLocationRelativeTo(null);
}

private boolean validateFields(){


if(!txtname.getText().equals("")){
return false;
}
else{
return true;
}
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jScrollPane1 = new javax.swing.JScrollPane();
tablecategory = new javax.swing.JTable();
jLabel2 = new javax.swing.JLabel();
txtname = new javax.swing.JTextField();
btnsave = new javax.swing.JButton();
btnupdate = new javax.swing.JButton();
btnreset = new javax.swing.JButton();
btnclose = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true);
addComponentListener(new java.awt.event.ComponentAdapter() {
public void componentShown(java.awt.event.ComponentEvent evt) {
formComponentShown(evt);
}
});
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N


jLabel1.setText("Manage Category");
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 20,
341, -1));

tablecategory.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {

},
}
});
getContentPane().add(btnclose, new org.netbeans.lib.awtextra.AbsoluteConstraints(770,
260, -1, 30));

jLabel3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/All_page_Background.png"))); //
NOI18N
getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -30,
960, 660));

pack();
}// </editor-fold>

private void formComponentShown(java.awt.event.ComponentEvent evt) {


// TODO add your handling code here:
DefaultTableModel model = (DefaultTableModel) tablecategory.getModel();
try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from category");
while(rs.next()){
model.addRow(new Object[]{rs.getString("category_pk"),rs.getString("name")});
}
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
btnupdate.setEnabled(false);
}

private void btncloseActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
setVisible(false);
}

private void btnsaveActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String name = txtname.getText();
if(validateFields()){
JOptionPane.showMessageDialog(null,"All fields are required");
}
else{
try{
Connection con = ConnectionProvider.getCon();
PreparedStatement pt = con.prepareStatement("insert into category (name) values(?)");
pt.setString(1, name);
pt.executeUpdate();
JOptionPane.showMessageDialog(null, "Category added successfully");
setVisible(false);
new ManageCategory().setVisible(true);
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
}
}
private void btnresetActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new ManageCategory().setVisible(true);
}

private void tablecategoryMouseClicked(java.awt.event.MouseEvent evt) {


// TODO add your handling code here:
int index = tablecategory.getSelectedRow();
TableModel model = tablecategory.getModel();
String id = model.getValueAt(index, 0).toString();
categoryPK = Integer.parseInt(id);

String name = model.getValueAt(index, 1).toString();


txtname.setText(name);
btnsave.setEnabled(false);
btnupdate.setEnabled(true);
}

private void btnupdateActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String name = txtname.getText();
if(validateFields()){
JOptionPane.showMessageDialog(null,"All fields are required");
}
else{
try{
Connection con = ConnectionProvider.getCon();
PreparedStatement pt = con.prepareStatement("update category set name=? where
category_pk=?");
pt.setString(1, name);
pt.setInt(2,categoryPK);
pt.executeUpdate();
JOptionPane.showMessageDialog(null, "Category updated successfully");
setVisible(false);
new ManageCategory().setVisible(true);
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
}
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
}

// Variables declaration - do not modify


private javax.swing.JButton btnclose;
private javax.swing.JButton btnreset;
private javax.swing.JButton btnsave;
private javax.swing.JButton btnupdate;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable tablecategory;
private javax.swing.JTextField txtname;
// End of variables declaration
}

ManageProduct.java:

import dao.ConnectionProvider;
import javax.swing.JOptionPane;
import java.sql.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

public class ManageProduct extends javax.swing.JFrame {


private int productPK = 0;
private int totalquantity = 0;
public ManageProduct() {
initComponents();
setLocationRelativeTo(null);
}

private void getAllCategory(){


try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from category");
comboboxcategory.removeAllItems();;
while(rs.next()){
comboboxcategory.addItem(rs.getString("category_pk")+"-"+rs.getString("name"));
}
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e);
}
}

private boolean validateFields(String formType){


if(formType.equals("edit") && !txtname.getText().equals(" ")
&& !txtprice.getText().equals(" ") && !txtdescription.getText().equals(" ")){
return false;
}
else if(formType.equals("new") && !txtname.getText().equals(" ")
&& !txtprice.getText().equals(" ") && !txtdescription.getText().equals(" ")
&& !txtquantity.getText().equals(" ")){
return false;
}
});
getContentPane().add(btnreset, new org.netbeans.lib.awtextra.AbsoluteConstraints(692,
471, -1, -1));

btnclose.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N


btnclose.setText("Close");
btnclose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btncloseActionPerformed(evt);
}
});
getContentPane().add(btnclose, new org.netbeans.lib.awtextra.AbsoluteConstraints(777,
471, -1, -1));

jLabel3.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/All_page_Background.png"))); //
NOI18N
getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -
1));

pack();
}// </editor-fold>

private void formComponentShown(java.awt.event.ComponentEvent evt) {


// TODO add your handling code here:
getAllCategory();
DefaultTableModel model = (DefaultTableModel) tableproduct.getModel();
try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from products inner join category on
products.category_fk = category.category_pk");
while(rs.next()){
model.addRow(new Object[]{rs.getString("product_pk"), rs.getString("name"),
rs.getString("quantity"), rs.getString("price"), rs.getString("description"),
rs.getString("category_fk"), rs.getString(8)});

}
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
btnupdate.setEnabled(false);
}

private void txtnameActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
}

private void btncloseActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
setVisible(false);
}

private void btnresetActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
setVisible(false);
new ManageProduct().setVisible(true);
}

private void btnsaveActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String name = txtname.getText();
String quantity = txtquantity.getText();
String price = txtprice.getText();
String description = txtdescription.getText();
String category = (String) comboboxcategory.getSelectedItem();
String categoryid[] = category.split("-",0);

if(validateFields("new")){
JOptionPane.showMessageDialog(null, "All fields are required");
}
else{
try{
Connection con = ConnectionProvider.getCon();
PreparedStatement pt = con.prepareStatement("insert into products
(name,quantity,price,description,category_fk) values(?,?,?,?,?)");
pt.setString(1,name);
pt.setString(2, quantity);
pt.setString(3, price);
pt.setString(4, description);
pt.setString(5, categoryid[0]);
pt.executeUpdate();
JOptionPane.showMessageDialog(null, "Product added successfully");
setVisible(false);
new ManageProduct().setVisible(true);
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
}
}

private void tableproductMouseClicked(java.awt.event.MouseEvent evt) {


// TODO add your handling code here:
int index = tableproduct.getSelectedRow();
TableModel model = tableproduct.getModel();
String id = model.getValueAt(index, 0).toString();
productPK = Integer.parseInt(id);

String name = model.getValueAt(index, 1).toString();


txtname.setText(name);

String quantity = model.getValueAt(index, 2).toString();


totalquantity = 0;
lblquantity.setText("Add Quantity");
totalquantity = Integer.parseInt(quantity);

String price = model.getValueAt(index, 3).toString();


txtprice.setText(price);

String description = model.getValueAt(index, 4).toString();


txtdescription.setText(description);
comboboxcategory.removeAllItems();
String categoryid = model.getValueAt(index, 5).toString();
String categoryname = model.getValueAt(index, 6).toString();
comboboxcategory.addItem(categoryid + "-"+ categoryname);

try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from category");
while(rs.next()){
if(Integer.parseInt(categoryid) != rs.getInt(1))
comboboxcategory.addItem(rs.getString("category_pk")+"-"+rs.getString("name"));
}
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e);
}

btnsave.setEnabled(false);
btnupdate.setEnabled(true);
}

private void btnupdateActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String name = txtname.getText();
String quantity = txtquantity.getText();
String price = txtprice.getText();
String description = txtdescription.getText();
String category = (String) comboboxcategory.getSelectedItem();
String categoryid[] = category.split("-",0);

if(validateFields("edit")){
JOptionPane.showMessageDialog(null, "All fields are required");
}
else{
try{
if(!quantity.equals(" ")){
totalquantity = totalquantity + Integer.parseInt(quantity);
}
Connection con = ConnectionProvider.getCon();
PreparedStatement pt = con.prepareStatement("update products set name=?,
quantity=?, price=?, description=?, category_fk=? where product_pk=?");

pt.setString(1,name);
pt.setInt(2, totalquantity);
pt.setString(3, price);
pt.setString(4, description);
pt.setString(5, categoryid[0]);
pt.setInt(6, productPK);

pt.executeUpdate();
JOptionPane.showMessageDialog(null, "Product updated successfully");
setVisible(false);
new ManageProduct().setVisible(true);
}
catch(Exception e){
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JLabel lblquantity;
private javax.swing.JTable tableproduct;
private javax.swing.JTextField txtdescription;
private javax.swing.JTextField txtname;
private javax.swing.JTextField txtprice;
private javax.swing.JTextField txtquantity;
// End of variables declaration
}

ManageCustomer.java:

import dao.ConnectionProvider;
import java.sql.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.JOptionPane;
public class ManageCustomer extends javax.swing.JFrame {
private int customerPK = 0;
public ManageCustomer() {
initComponents();
setLocationRelativeTo(null);
}
// TODO add your handling code here:
DefaultTableModel model = (DefaultTableModel) tablecustomer.getModel();
try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from customer");
while(rs.next()){
model.addRow(new Object[]{rs.getString("customer_pk"), rs.getString("name"),
rs.getString("mobileNumber"), rs.getString("email")});
}
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
btnupdate.setEnabled(false);
}

private void btncloseActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
setVisible(false);
}

private void btnresetActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
setVisible(false);
new ManageCustomer().setVisible(true);
}
private void btnsaveActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String name = txtname.getText();
String mobileNumber = txtmobile.getText();
String email = txtemail.getText();

if(validateFields()){
JOptionPane.showMessageDialog(null, "All fields are required");
}
else{
try{
Connection con = ConnectionProvider.getCon();
PreparedStatement pt = con.prepareStatement("insert into customer
(name,mobileNumber,email) values(?,?,?)");
pt.setString(1, name);
pt.setString(2, mobileNumber);
pt.setString(3, email);
pt.executeUpdate();
JOptionPane.showMessageDialog(null, "Customer added successfully");
setVisible(false);
new ManageCustomer().setVisible(true);
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
}
}
private void tablecustomerMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
int index = tablecustomer.getSelectedRow();
TableModel model = tablecustomer.getModel();

String id = model.getValueAt(index, 0).toString();


customerPK = Integer.parseInt(id);

String name = model.getValueAt(index, 1).toString();


txtname.setText(name);

String mobileNumber = model.getValueAt(index, 2).toString();


txtmobile.setText(mobileNumber);

String email = model.getValueAt(index, 3).toString();


txtemail.setText(email);

btnsave.setEnabled(false);
btnupdate.setEnabled(true);
}

private void btnupdateActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String name = txtname.getText();
String mobileNumber = txtmobile.getText();
String email = txtemail.getText();

if(validateFields()){
JOptionPane.showMessageDialog(null, "All fields are required");
}
else{
try{
Connection con = ConnectionProvider.getCon();
PreparedStatement pt = con.prepareStatement("update customer set name=?,
mobileNumber=?, email=? where customer_pk=?");
pt.setString(1, name);
pt.setString(2, mobileNumber);
pt.setString(3, email);
pt.setInt(4, customerPK);
pt.executeUpdate();
JOptionPane.showMessageDialog(null, "Customer updated
successfully");
setVisible(false);
new ManageCustomer().setVisible(true);
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
}
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import commonFinish.openPdf;
import static commonFinish.openPdf.openbyid;
import java.sql.*;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import dao.ConnectionProvider;
import dao.StockUtils;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.*;
public class ManageOrder extends javax.swing.JFrame {
private int customerPK = 0;
private int productPK = 0;
private int finaltotalprice = 0;
private String orderid = "";
public ManageOrder() {
initComponents();
setLocationRelativeTo(null);
}

private void clearProductFields(){


productPK = 0;
txtproductname.setText("");
txtproductprice.setText("");
txtproductdescription.setText("");
txtorderquantity.setText("");
}

public String getUniqueId(String prefix){


return prefix + System.nanoTime();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
tablecustomer = new javax.swing.JTable();
jLabel3 = new javax.swing.JLabel();
jScrollPane2 = new javax.swing.JScrollPane();
tableproduct = new javax.swing.JTable();
jLabel4 = new javax.swing.JLabel();
jLabel16.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/Orders_background.png"))); // NOI18N
getContentPane().add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1,
-1));

pack();
}// </editor-fold>

private void formComponentShown(java.awt.event.ComponentEvent evt) {


// TODO add your handling code here:
txtcustomername.setEditable(false);
txtcustomermobile.setEditable(false);
txtcustomeremail.setEditable(false);

txtproductname.setEditable(false);
txtproductprice.setEditable(false);
txtproductdescription.setEditable(false);

DefaultTableModel model = (DefaultTableModel) tablecustomer.getModel();


DefaultTableModel productmodel = (DefaultTableModel) tableproduct.getModel();

try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from customer");
while(rs.next()){
model.addRow(new Object[]{rs.getString("customer_pk"), rs.getString("name"),
rs.getString("mobileNumber"), rs.getString("email")});
}

rs = st.executeQuery("select * from products inner join category on products.category_fk


= category.category_pk");
while(rs.next()){
productmodel.addRow(new Object[]{rs.getString("product_pk"), rs.getString("name"),
rs.getString("price"), rs.getString("quantity"), rs.getString("description"),
rs.getString("category_fk"), rs.getString(1)});

}
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
}

private void btnresetActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
setVisible(false);
new ManageOrder().setVisible(true);
}

private void btnsaveorderdetailsActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
if(finaltotalprice != 0 && !txtcustomername.getText().equals(" ")){
orderid = getUniqueId("Bill-");

DefaultTableModel dtm = (DefaultTableModel) tablecart.getModel();


if(tablecart.getRowCount() != 0){
for(int i=0; i<tablecart.getRowCount(); i++){
try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("update products set
quantity="+Integer.parseInt(dtm.getValueAt(i, 2).toString())+" where
product_pk="+Integer.parseInt(dtm.getValueAt(i, 0).toString())+"");
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
}
}
try {
SimpleDateFormat myformat = new SimpleDateFormat("dd-mm-yyyy");
Calendar cal = Calendar.getInstance();
Connection con = ConnectionProvider.getCon();
PreparedStatement pt = con.prepareStatement("insert into orderDetail (orderid,
customer_fk, orderdate, totalpaid) values(?,?,?,?)");
pt.setString(1, orderid);
pt.setInt(2, customerPK);
pt.setString(3, myformat.format(cal.getTime()));
pt.setInt(4, finaltotalprice);
pt.executeUpdate();
}
catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}
//Creating document
com.itextpdf.text.Document doc = new com.itextpdf.text.Document();
try{
SimpleDateFormat myformat = new SimpleDateFormat("dd-mm-yyyy");
Calendar cal = Calendar.getInstance();
PdfWriter.getInstance(doc, new
FileOutputStream(StockUtils.billpath+""+orderid+".pdf"));
doc.open();
Paragraph projectname = new Paragraph(" Stock Maintenanace
System\n");
doc.add(projectname);
Paragraph starline = new
Paragraph("********************************************************************
*********************\n");
doc.add(starline);
Paragraph details = new Paragraph("\tOrderID: "+orderid+"\nDate:
"+myformat.format(cal.getTime())+"\nTotal Paid: "+finaltotalprice);
doc.add(details);
doc.add(starline);
PdfPTable tb1 = new PdfPTable(5);
PdfPCell namecell = new PdfPCell(new Phrase("Name"));
PdfPCell descriptioncell = new PdfPCell(new Phrase("Description"));
PdfPCell pricecell = new PdfPCell(new Phrase("Price per unit"));
PdfPCell quantitycell = new PdfPCell(new Phrase("Quantity"));
PdfPCell subtotalpricecell = new PdfPCell(new Phrase("Sub Total Price"));

BaseColor backgroundcolor = new BaseColor(255,204,51);


namecell.setBackgroundColor(backgroundcolor);
descriptioncell.setBackgroundColor(backgroundcolor);
pricecell.setBackgroundColor(backgroundcolor);
quantitycell.setBackgroundColor(backgroundcolor);
subtotalpricecell.setBackgroundColor(backgroundcolor);

tb1.addCell(namecell);
tb1.addCell(descriptioncell);
tb1.addCell(pricecell);
tb1.addCell(quantitycell);
tb1.addCell(subtotalpricecell);

for(int i=0; i<tablecart.getRowCount(); i++){


tb1.addCell(tablecart.getValueAt(i, 1).toString());
tb1.addCell(tablecart.getValueAt(i, 4).toString());
tb1.addCell(tablecart.getValueAt(i, 3).toString());
tb1.addCell(tablecart.getValueAt(i, 2).toString());
tb1.addCell(tablecart.getValueAt(i, 5).toString());
}

doc.add(tb1);
doc.add(starline);
Paragraph thanksmessage = new Paragraph("Thank you. Please visit again.");
doc.add(thanksmessage);
openPdf.openbyid(orderid);
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}
doc.close();
setVisible(false);
new ManageOrder().setVisible(true);
}
else{
JOptionPane.showMessageDialog(null, "Please add some product to the cart or select
customer");
}
}

private void btnaddtocartActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
String noOfunits = txtorderquantity.getText();
if(!noOfunits.equals(" ")){
String productname = txtproductname.getText();
String productdescription = txtproductdescription.getText();
String productprice = txtproductprice.getText();

int totalprice = Integer.parseInt(txtorderquantity.getText()) *


Integer.parseInt(productprice);

int checkstock = 0;
int checkincart = 0;

try{
Connection con = ConnectionProvider.getCon();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from products where
product_pk="+productPK+"");
while(rs.next()){
if(rs.getInt("quantity") >= Integer.parseInt(noOfunits)){
checkstock = 1;
}
else{
JOptionPane.showMessageDialog(null, "Product out of stock. Only
"+rs.getInt("quantity")+" left");
}
}
}
catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}

if(checkstock == 1){
DefaultTableModel model = (DefaultTableModel) tablecart.getModel();
if(tablecart.getRowCount() != 0){
for(int i=0; i<tablecart.getRowCount(); i++){
if(Integer.parseInt(model.getValueAt(i, 0).toString()) == productPK){
checkincart = 1;
JOptionPane.showMessageDialog(null, "Product already exists in cart");
}
}
}
if(checkincart == 0){
model.addRow(new Object[]{productPK, productname, noOfunits, productprice,
productdescription, totalprice});
finaltotalprice = finaltotalprice + totalprice;
lblfinaltotalprice.setText(String.valueOf(finaltotalprice));
JOptionPane.showMessageDialog(null, "Product added successfully");
}
clearProductFields();
}
}
else{
JOptionPane.showMessageDialog(null, "No of quantity and product field is required");
}
}

private void tablecustomerMouseClicked(java.awt.event.MouseEvent evt) {


// TODO add your handling code here:
int index = tablecustomer.getSelectedRow();
TableModel model = tablecustomer.getModel();
String id = model.getValueAt(index, 0).toString();
customerPK = Integer.parseInt(id);

String name = model.getValueAt(index, 1).toString();


txtcustomername.setText(name);

String mobileno = model.getValueAt(index, 2).toString();


txtcustomermobile.setText(mobileno);

String email = model.getValueAt(index, 3).toString();


txtcustomeremail.setText(email);
}

private void tableproductMouseClicked(java.awt.event.MouseEvent evt) {


// TODO add your handling code here:
int index = tableproduct.getSelectedRow();
TableModel model = tableproduct.getModel();
String id = model.getValueAt(index, 0).toString();
productPK = Integer.parseInt(id);

String productname = model.getValueAt(index, 1).toString();


txtproductname.setText(productname);

String productprice = model.getValueAt(index, 2).toString();


txtproductprice.setText(productprice);

String productdescription = model.getValueAt(index, 4).toString();


txtproductdescription.setText(productdescription);
}

private void btncloseActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
setVisible(false);
}

private void tablecartMouseClicked(java.awt.event.MouseEvent evt) {


// TODO add your handling code here:
int index = tablecart.getSelectedRow();
int a = JOptionPane.showConfirmDialog(null, "Do you want to remove this product",
"Select", JOptionPane.YES_NO_OPTION);
if(a == 0){
TableModel model = tablecart.getModel();
String subtotal = model.getValueAt(index, 5).toString();
finaltotalprice = finaltotalprice - Integer.parseInt(subtotal);
lblfinaltotalprice.setText(String.valueOf(finaltotalprice));
((DefaultTableModel) tablecart.getModel()).removeRow(index);
}
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(ManageOrder.class.getName()).log(java.util.logging.Level.S
EVERE, null, ex);
} catch (InstantiationException ex) {

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy