0% found this document useful (0 votes)
6 views64 pages

Supermarket Management System Overview

The document outlines a Java Swing application named Supermarket, which is a desktop management system for a supermarket using Oracle Database via JDBC. The project structure includes various classes for functionalities such as billing, product management, and user authentication, originally developed in NetBeans and now opened in IntelliJ IDEA. The workflow includes logging in, managing products and categories, generating bills, and updating records.
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)
6 views64 pages

Supermarket Management System Overview

The document outlines a Java Swing application named Supermarket, which is a desktop management system for a supermarket using Oracle Database via JDBC. The project structure includes various classes for functionalities such as billing, product management, and user authentication, originally developed in NetBeans and now opened in IntelliJ IDEA. The workflow includes logging in, managing products and categories, generating bills, and updating records.
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

need ur help with internsip project understnad made 3 yrs back ..

this is the project strcture,,i


opened it in intellij actaully it was amd ein net beans ..wiat let me send u codes and what i need

Got it 👍 I see your project structure from the screenshot.


Your project is named Supermarket and it looks like a Java Swing + Oracle DB (JDBC) based desktop
application built in NetBeans (you can tell from the .form files). Now you’ve opened it in IntelliJ IDEA.

Here’s what I can tell so far:

📂 Project Structure Breakdown


.idea/ → IntelliJ project config files (not important for the logic).
build/ → contains compiled files.

classes/required_files/[Link] → This is the Oracle JDBC Driver (used to connect Java to


Oracle DB).
classes/supermarket/ → This contains your Java Swing source files.

[Link] / [Link] → GUI + logic for the billing screen.


[Link] / .form → GUI + logic for category management (maybe adding
food/product categories).

[Link] / .form → Login page (likely connects to DB for user authentication).


[Link] / .form → Product management (CRUD for products).

[Link] / .form → Possibly for seller details management.


[Link] / .form → Splash screen (loading screen).

[Link] → Likely the main class that runs the application.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 1/64
[Link] / .form → Update product details or billing records.
empty/, generated-sources/ → Supporting folders created by NetBeans.
[Link] → Build info for NetBeans.

✅ This means your project is a Supermarket Management System where you can:
Login
Manage products

Categorize items
Handle sellers

Generate bills
Show splash + update records

👉 Now, you said you’ll send me the code files and what you need. Perfect! Once I see the actual Java
code, I’ll explain:

What each class does (line by line if you want)

How Oracle DB is connected (via [Link])


How the GUI was built (NetBeans drag-drop Swing forms)

Would you like me to:

1. First explain the entire project objective + workflow (what happens from login → billing → exit)?

2. Or directly start explaining the Java code files one by one?


I’ve gone through your screenshot carefully 👍
This project is a Java Swing + Oracle Database application that was originally made in NetBeans (you
can tell from the .form files). You’ve now opened it in IntelliJ.

🔎 What the structure tells us


[Link] → Oracle JDBC driver (used for database connection).
supermarket folder → Contains all the main Java files with .form files for the GUI (NetBeans drag-
and-drop).

[Link] / [Link] → login screen (probably checks username/password from DB).

[Link] / [Link] → billing module (cart, invoice generation).

[Link] / .form → category management (e.g., “Dairy, Fruits, Snacks”).


[Link] / .form → product management (CRUD).

[Link] / .form → seller info.

[Link] / .form → splash/loading screen.

[Link] → main entry point.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 2/64
[Link] / .form → update product/bill details.
[Link], .netbeans_automatic_build etc. → NetBeans project files (not code logic).

[Link] / [Link] → images/icons for GUI.

🛒 Likely Project Workflow


1. Splash screen opens first.
2. Login page → verifies user from Oracle DB using [Link].

3. After login, user goes to main dashboard ([Link]).

4. From there:

Manage products ([Link]).


Manage categories ([Link]).

Manage sellers ([Link]).

Generate bills ([Link]).

Update records ([Link]).

So basically, it’s a Supermarket Management System desktop app.

👉 Now you mentioned you’ll share code files and what exactly you need.
Would you like me to:

(A) Give you a big-picture explanation of the whole project (objective, purpose, flow, tools used)?

(B) Or go file by file ([Link], [Link], etc.) and explain the code step by step?

internship in advanced java laerant java swing and jdbc, orcale db.....will give u project codes
...explain entire project in sratch allcoes ..explain project objective purpose . y did u make it and
tools used ide used and eveything ...eplain the project details very minutely...dont generate
anything i will sned code first till then wait once i finish sending then repsond to it plsss...//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package supermarket;

import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 3/64
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];

public class Billing extends JFrame {


Connection Con = null;
Statement St = null;
ResultSet Rs = null;
int prid;
int newqty;
int i = 0;
Double Uprice;
Double ProdTot = (double)0.0F;
Double GrdTotal = (double)0.0F;
int AvailQty;
private JButton ADDbtn;
private JTextArea BillText;
private JButton Clearbtn;
private JLabel Close;
private JButton Filterbtn;
private JLabel Grdtotlbl;
private JButton Logout;
private JButton Printbtn;
private JTextField Prodqty;
private JTextField Prodqty1;
private JTextField Prodqty2;
private JTable ProductTable;
private JComboBox<String> Productcb;
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 4/64
private JTextField Productname;
private JButton RefreshBtn;
private JTextField billid;
private JLabel jLabel1;
private JLabel jLabel2;
private JLabel jLabel3;
private JLabel jLabel4;
private JLabel jLabel5;
private JLabel jLabel6;
private JLabel jLabel7;
private JPanel jPanel1;
private JPanel jPanel2;
private JScrollPane jScrollPane1;
private JScrollPane jScrollPane2;

public Billing() {
[Link]();
[Link]();
[Link]();

try {
Vector<String> cols = new Vector();
String[] arr = new String[]{"PROD ID", "PROD NAME", "QUANTITY", " PRICE",
"CATEGORY"};

for(int i = 0; i < [Link]; ++i) {


[Link](arr[i]);
}

Vector<Vector> rows = new Vector();


String sql = "select * from Productmt";
PreparedStatement ps = [Link](sql);
ResultSet rs = [Link]();

while([Link]()) {
int pid = [Link]("prodid");
String pname = [Link]("prodname");
String pqty = [Link]("prodqt");
String price = [Link]("prodprc");
String cat = [Link]("prodcat");
Vector<String> single_row = new Vector();
single_row.add("" + pid);
single_row.add(pname);
single_row.add(pqty);
single_row.add(price);
single_row.add(cat);
[Link](single_row);
}

[Link]();
[Link]();
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 5/64
DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm);
} catch (Exception ex) {
[Link]();
}

private void initComponents() {


this.jPanel1 = new JPanel();
this.jPanel2 = new JPanel();
this.jLabel1 = new JLabel();
this.jLabel2 = new JLabel();
this.jLabel3 = new JLabel();
this.jLabel4 = new JLabel();
[Link] = new JTextField();
[Link] = new JTextField();
[Link] = new JTextField();
this.jLabel7 = new JLabel();
[Link] = new JButton();
[Link] = new JButton();
[Link] = new JButton();
this.jScrollPane2 = new JScrollPane();
[Link] = new JTextArea();
[Link] = new JButton();
[Link] = new JComboBox();
this.Prodqty1 = new JTextField();
this.Prodqty2 = new JTextField();
this.jScrollPane1 = new JScrollPane();
[Link] = new JTable();
[Link] = new JLabel();
[Link] = new JButton();
this.jLabel6 = new JLabel();
this.jLabel5 = new JLabel();
[Link] = new JLabel();
[Link] = new JButton();
[Link](3);
[Link](new Color(0, 0, 0));
[Link](new Font("Gabriola", 1, 36));
[Link]("BILLING POINT");
[Link](new Font("Times New Roman", 1, 16));
[Link]("BILLID");
[Link](new Font("Times New Roman", 1, 16));
[Link]("NAME");
[Link](new Font("Times New Roman", 1, 16));
[Link]("QUANTITY");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 6/64
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link]("0");
[Link](new Font("Gabriola", 1, 24));
[Link]("PRODUCT LIST");
[Link](new Color(153, 153, 153));
[Link](new Font("Gabriola", 1, 18));
[Link]("ADD TO BILL");
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link](evt);
}
});
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Color(153, 153, 153));
[Link](new Font("Times New Roman", 1, 18));
[Link]("Refresh");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Color(153, 153, 153));
[Link](new Font("Gabriola", 1, 18));
[Link]("CLEAR");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](20);
[Link](new Font("Times New Roman", 1, 18));
[Link](5);
[Link]([Link]);
[Link](new Color(153, 153, 153));
[Link](new Font("Gabriola", 1, 18));
[Link]("PRINT");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Font("Times New Roman", 1, 14));
[Link](new ItemListener() {
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 7/64
public void itemStateChanged(ItemEvent evt) {
[Link](evt);
}
});
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link]([Link]());
[Link](new Font("Times New Roman", 1, 14));
[Link](new DefaultTableModel(new Object[0][], new String[]
{"PRODID", "PRODNAME", "PRODQTY", "PRODPRICE", "PRODCAT"}));
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link](evt);
}
});
[Link]([Link]);
[Link](new Font("Times New Roman", 1, 24));
[Link]("\nRs");
[Link](new Font("Times New Roman", 1, 18));
[Link]("Filter");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]"));
GroupLayout jPanel2Layout = new GroupLayout(this.jPanel2);
[Link](jPanel2Layout);

[Link]([Link]([Link]).add
Group([Link]().addGroup([Link](Ali
[Link]).addGroup([Link]().addGap(42, 42,
42).addGroup([Link]([Link]).addComponent([Link]
el4).addGroup([Link]([Link]).addComponent([Link]
bel2).addComponent(this.jLabel3)))).addGroup([Link]().addGap(
21, 21, 21).addComponent([Link], -2, 125,
-2))).addGroup([Link]([Link]).addGroup(jPanel2Layou
[Link]().addGap(191, 191, 191).addComponent(this.jScrollPane1, -2, -1,
-2)).addGroup([Link]().addGap(4, 4,
4).addGroup([Link]([Link]).addGroup(jPanel2Layout.
createSequentialGroup().addGroup([Link]([Link]).ad
dComponent(this.jLabel7).addGroup([Link]().addComponent(thi
s.jLabel6).addGap(62, 62, 62).addComponent(this.jLabel1, -2, 207,
-2)).addGroup([Link]().addGroup([Link]
oup([Link]).addComponent([Link], -2, 117,
-2).addComponent([Link], -2, 117, -2).addComponent([Link], -2, 117,
-2).addComponent([Link], -2, 111, -2)).addGap(57, 57, 57).addComponent([Link],
-2, 121, -2).addGap(22, 22, 22).addComponent([Link], -2, 127, -2))).addGap(37, 37,
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 8/64
37).addComponent([Link], -2, 106,
-2)).addGroup([Link]([Link],
false).addGroup([Link], [Link]().addGap(33, 33,
33).addComponent([Link], -2, 106, -2).addPreferredGap([Link],
-1, 32767).addComponent([Link], -2, 106, -2)).addGroup([Link],
[Link]().addGap(25, 25, 25).addComponent(this.jScrollPane2, -2,
494, -2)))))).addContainerGap(123,
32767)).addGroup([Link]([Link]).addGroup(jPanel2La
[Link]().addGap(251, 251, 251).addComponent(this.Prodqty1, -1, 63,
32767).addGap(521, 521,
521))).addGroup([Link]([Link]).addGroup(jPanel2Lay
[Link]().addGap(261, 261, 261).addComponent(this.Prodqty2, -1, 63,
32767).addGap(511, 511, 511))));

[Link]([Link]([Link]).addGr
oup([Link]().addGap(27, 27,
27).addGroup([Link]([Link]).addGroup(jPanel2Layout
.createSequentialGroup().addGap(28, 28, 28).addComponent(this.jLabel1).addGap(55, 55,
55).addComponent(this.jLabel7)).addComponent(this.jLabel6, -2, 138,
-2)).addGroup([Link]([Link]).addGroup(jPanel2Layout
.createSequentialGroup().addGap(28, 28,
28).addGroup([Link]([Link]).addComponent([Link]
ductcb, -2, 29, -2).addComponent([Link], -2, 32,
-2).addComponent([Link]))).addGroup([Link]().addGap
(38, 38,
38).addGroup([Link]([Link]).addComponent([Link]
d, -2, 33, -2).addComponent(this.jLabel2)))).addGap(18, 18,
18).addGroup([Link]([Link]).addGroup([Link]
AILING, [Link]().addComponent(this.jScrollPane1, -2, 135,
-2).addGap(56, 56, 56)).addGroup([Link],
[Link]().addGroup([Link](Alignmen
[Link]).addComponent([Link], -2, 34,
-2).addComponent(this.jLabel3)).addGap(26, 26,
26).addGroup([Link]([Link]).addComponent([Link]
bel4).addComponent([Link], -2, 30, -2)).addGap(32, 32,
32).addGroup([Link]([Link]).addComponent([Link]
Dbtn).addComponent([Link])).addGap(29, 29, 29))).addComponent(this.jScrollPane2, -2,
228, -2).addGap(18, 18,
18).addGroup([Link]([Link]).addComponent([Link]
otlbl).addComponent([Link])).addContainerGap(27,
32767)).addGroup([Link]([Link]).addGroup(jPanel2La
[Link]().addGap(209, 209, 209).addComponent(this.Prodqty1, -2, 0,
-2).addContainerGap(600,
32767))).addGroup([Link]([Link]).addGroup(jPanel2L
[Link]().addGap(219, 219, 219).addComponent(this.Prodqty2, -2, 0,
-2).addContainerGap(590, 32767))));
[Link](new Color(255, 255, 255));
[Link](new Font("Times New Roman", 1, 18));
[Link](new Color(255, 255, 255));
[Link]("x");
[Link](new MouseAdapter() {
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 9/64
public void mouseClicked(MouseEvent evt) {
[Link](evt);
}
});
[Link](new Font("Times New Roman", 1, 18));
[Link](new ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]"));
[Link]("Logout");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
GroupLayout jPanel1Layout = new GroupLayout(this.jPanel1);
[Link](jPanel1Layout);

[Link]([Link]([Link]).add
Group([Link]().addContainerGap(-1,
32767).addGroup([Link]([Link]).addGroup(Alignment
.TRAILING,
[Link]().addGroup([Link](Alignmen
[Link]).addGroup([Link]().addComponent(this.jLabel5, -2,
31, -2).addGap(109, 109,
109)).addGroup([Link]().addComponent([Link]).addPreferr
edGap([Link]))).addComponent(this.jPanel2, -2, -1, -2).addGap(36, 36,
36)).addGroup([Link],
[Link]().addComponent([Link], -2, 20, -2).addGap(52, 52,
52)))));

[Link]([Link]([Link]).addGr
oup([Link]().addGap(4, 4, 4).addComponent([Link], -2, 20,
-2).addPreferredGap([Link]).addComponent(this.jPanel2, -2, -1,
-2).addContainerGap(-1, 32767)).addGroup([Link]().addGap(88,
88, 88).addComponent(this.jLabel5).addPreferredGap([Link], 632,
32767).addComponent([Link]).addGap(124, 124, 124)));
GroupLayout layout = new GroupLayout([Link]());
[Link]().setLayout(layout);

[Link]([Link]([Link]).addComponent(this
.jPanel1, -2, -1, -2));

[Link]([Link]([Link]).addGroup(Alignment.T
RAILING, [Link]().addComponent(this.jPanel1, -2, -1, -2).addGap(0, 0,
32767)));
[Link]();
}

public void SelectSeller() {


try {
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
"system", "Shravani1508");
[Link] = [Link]();
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 10/64
[Link] = [Link]("Select * from [Link]");
} catch (Exception e) {
[Link]();
}

public void update() {


try {
[Link] = [Link] - [Link]([Link]());
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
"system", "Shravani1508");
String Query = "Update [Link] set PRODQT='" + [Link] + "'where
PRODID=" + [Link];
Statement Add = [Link]();
[Link](Query);
[Link]();
} catch (Exception e) {
[Link]();
}

private void ADDbtnMouseClicked(MouseEvent evt) {


}

private void ADDbtnActionPerformed(ActionEvent evt) {


if (![Link]().isEmpty() && ![Link]().isEmpty()) {
if ((double)[Link] <= [Link]([Link]())) {
[Link](this, "Not Enough In Stock");
} else {
++this.i;
[Link] = [Link] * [Link]([Link]());
[Link] = [Link] + [Link];
if (this.i == 1) {
JTextArea var10000 = [Link];
String var10001 = [Link]();
[Link](var10001 +
"*********************CARTMAX*********************\t\n
NUM\tPRODUCT\tPRICE\t\tQUANTITY\tTOTAL\n" + this.i + "\t" + [Link]() +
"\t" + [Link] + "\t" + [Link]() + "\t" + [Link] + "\n");
} else {
JTextArea var17 = [Link];
String var18 = [Link]();
[Link](var18 + this.i + "\t" + [Link]() + "\t" + [Link] +
"\t" + [Link]() + "\t" + [Link] + "\n");
}

[Link]("Rs" + [Link]);
[Link]();
}
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 11/64
} else {
[Link](this, "Missing Information");
}

try {
Vector<String> cols = new Vector();
String[] arr = new String[]{"PROD ID", "PROD NAME", "QUANTITY", " PRICE",
"CATEGORY"};

for(int i = 0; i < [Link]; ++i) {


[Link](arr[i]);
}

Vector<Vector> rows = new Vector();


String sql = "select * from Productmt";
PreparedStatement ps = [Link](sql);
ResultSet rs = [Link]();

while([Link]()) {
int pid = [Link]("prodid");
String pname = [Link]("prodname");
String pqty = [Link]("prodqt");
String price = [Link]("prodprc");
String cat = [Link]("prodcat");
Vector<String> single_row = new Vector();
single_row.add("" + pid);
single_row.add(pname);
single_row.add(pqty);
single_row.add(price);
single_row.add(cat);
[Link](single_row);
}

[Link]();
[Link]();
DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm);
} catch (Exception ex) {
[Link]();
}

private void RefreshBtnActionPerformed(ActionEvent evt) {


try {
Vector<String> cols = new Vector();
String[] arr = new String[]{"PROD ID", "PROD NAME", "QUANTITY", " PRICE",
"CATEGORY"};

for(int i = 0; i < [Link]; ++i) {


[Link](arr[i]);
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 12/64
}

Vector<Vector> rows = new Vector();


[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
"system", "Shravani1508");
String sql = "select * from Productmt";
PreparedStatement ps = [Link](sql);
ResultSet rs = [Link]();

while([Link]()) {
int pid = [Link]("prodid");
String pname = [Link]("prodname");
String pqty = [Link]("prodqt");
String price = [Link]("prodprc");
String cat = [Link]("prodcat");
Vector<String> single_row = new Vector();
single_row.add("" + pid);
single_row.add(pname);
single_row.add(pqty);
single_row.add(price);
single_row.add(cat);
[Link](single_row);
}

[Link]();
[Link]();
DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm);
} catch (Exception ex) {
[Link]();
}

private void ClearbtnActionPerformed(ActionEvent evt) {


[Link]("");
[Link]("");
[Link]("");
}

private void PrintbtnActionPerformed(ActionEvent evt) {


try {
JTextArea var10000 = [Link];
String var10001 = [Link]();
[Link](var10001 + "\nGrand Total = " + [Link] + "\n");
[Link]();
} catch (Exception e) {
[Link]();
}

}
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 13/64
private void ProductnameActionPerformed(ActionEvent evt) {
}

private void GetCat() {


try {
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
"system", "Shravani1508");
[Link] = [Link]();
String query = "Select * from [Link]";
[Link] = [Link](query);

while([Link]()) {
String Mycat = [Link]("catname");
[Link](Mycat);
}
} catch (Exception e) {
[Link]();
}

private void ProductTableMouseClicked(MouseEvent evt) {


DefaultTableModel model = (DefaultTableModel)[Link]();
int Myindex = [Link]();
[Link] = [Link]([Link](Myindex, 0).toString());
[Link] = [Link]([Link](Myindex, 2).toString());
[Link] = [Link] - [Link]([Link]());
[Link]([Link](Myindex, 1).toString());
[Link] = [Link]([Link](Myindex, 3).toString());
[Link] = [Link] * (double)[Link]([Link]());
}

private void ProductcbActionPerformed(ActionEvent evt) {


}

private void billidActionPerformed(ActionEvent evt) {


}

private void ProductcbItemStateChanged(ItemEvent evt) {


}

private void FilterbtnActionPerformed(ActionEvent evt) {


try {
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
"system", "Shravani1508");
[Link] = [Link]();
String product_type = ((String)[Link]()).trim().toUpperCase();
[Link] = [Link]("Select * from [Link] where prodcat ='" +
product_type + "'");
Vector<String> cols = new Vector();
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 14/64
String[] arr = new String[]{"PROD ID", "PROD NAME", "QUANTITY", " PRICE",
"CATEGORY"};

for(int i = 0; i < [Link]; ++i) {


[Link](arr[i]);
}

Vector<Vector> rows = new Vector();

while([Link]()) {
int pid = [Link]("prodid");
String pname = [Link]("prodname");
String pqty = [Link]("prodqt");
String price = [Link]("prodprc");
String cat = [Link]("prodcat");
Vector<String> single_row = new Vector();
single_row.add("" + pid);
single_row.add(pname);
single_row.add(pqty);
single_row.add(price);
single_row.add(cat);
[Link](single_row);
}

[Link]();
[Link]();
DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm);
} catch (Exception e) {
[Link]();
}

private void CloseMouseClicked(MouseEvent evt) {


[Link](0);
}

private void LogoutActionPerformed(ActionEvent evt) {


(new Login()).setVisible(true);
[Link]();
}

public static void main(String[] args) {


try {
for([Link] info : [Link]()) {
if ("Nimbus".equals([Link]())) {
[Link]([Link]());
break;
}
}
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 15/64
} catch (ClassNotFoundException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
} catch (InstantiationException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
} catch (IllegalAccessException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
} catch (UnsupportedLookAndFeelException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
}

[Link](new Runnable() {
public void run() {
(new Billing()).setVisible(true);
}
});
}
} ....//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package supermarket;

import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 16/64
import [Link];
import [Link];
import [Link];

public class CATEGORIES extends JFrame {


Connection Con = null;
Statement St = null;
ResultSet Rs = null;
private JButton AddBtn;
private JTextField CatDesc;
private JTextField CatId;
private JTextField CatName;
private JTable CategoryTbl;
private JButton DeleteBtn;
private JLabel Exitbtn;
private JButton Logout;
private JButton UpdateBtn;
private JButton jButton3;
private JLabel jLabel1;
private JLabel jLabel10;
private JLabel jLabel11;
private JLabel jLabel2;
private JLabel jLabel3;
private JLabel jLabel4;
private JLabel jLabel7;
private JLabel jLabel8;
private JPanel jPanel1;
private JPanel jPanel2;
private JPanel jPanel3;
private JScrollPane jScrollPane1;
private JSeparator jSeparator1;

public CATEGORIES() {
[Link]();
[Link]();

try {
Vector<String> cols = new Vector();
String[] arr = new String[]{"CATEGORY ID", "CATEGORY Name", "CATEGORY
DESCRIPTION"};

for(int i = 0; i < [Link]; ++i) {


[Link](arr[i]);
}

Vector<Vector> rows = new Vector();


String sql = "select * from Categoryt";
PreparedStatement ps = [Link](sql);
ResultSet rs = [Link]();

while([Link]()) {
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 17/64
int cid = [Link]("CatId");
String cname = [Link]("CatName");
String cdesc = [Link]("CatDesc");
Vector<String> single_row = new Vector();
single_row.add("" + cid);
single_row.add(cname);
single_row.add(cdesc);
[Link](single_row);
}

[Link]();
[Link]();
[Link]();
DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm);
} catch (Exception e) {
[Link]();
}

private void initComponents() {


this.jPanel2 = new JPanel();
this.jPanel1 = new JPanel();
[Link] = new JLabel();
this.jPanel3 = new JPanel();
this.jLabel2 = new JLabel();
this.jLabel3 = new JLabel();
[Link] = new JTextField();
this.jLabel4 = new JLabel();
[Link] = new JTextField();
this.jLabel7 = new JLabel();
[Link] = new JTextField();
[Link] = new JButton();
[Link] = new JButton();
this.jButton3 = new JButton();
[Link] = new JButton();
this.jScrollPane1 = new JScrollPane();
[Link] = new JTable();
this.jLabel8 = new JLabel();
this.jLabel1 = new JLabel();
this.jSeparator1 = new JSeparator();
this.jLabel10 = new JLabel();
this.jLabel11 = new JLabel();
[Link] = new JButton();
[Link](3);
[Link](new Color(0, 0, 0));
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link].jPanel1MouseClicked(evt);
}
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 18/64
});
[Link](new Font("Tahoma", 0, 18));
[Link](new Color(255, 255, 255));
[Link]("x");
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link](evt);
}
});
[Link](new Font("Gabriola", 1, 24));
[Link]("CATEGORIES LIST");
[Link](new Font("Gabriola", 1, 18));
[Link]("NAME");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Font("Gabriola", 1, 18));
[Link]("CATEGORIES ID");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Font("Gabriola", 1, 18));
[Link]("DESCRIPTION");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Color(153, 153, 153));
[Link](new Font("Gabriola", 1, 18));
[Link]("UPDATE");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Color(153, 153, 153));
[Link](new Font("Gabriola", 1, 18));
[Link]("DELETE");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Color(153, 153, 153));
[Link](new Font("Gabriola", 1, 18));
[Link]("CLEAR");
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 19/64
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link].jButton3ActionPerformed(evt);
}
});
[Link](new Color(153, 153, 153));
[Link](new Font("Gabriola", 1, 18));
[Link]("ADD");
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link](evt);
}
});
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Font("Times New Roman", 1, 14));
[Link](new DefaultTableModel(new Object[][]{{null, null, null}, {null,
null, null}, {null, null, null}, {null, null, null}}, new String[]{"ID", "NAME", "DESCRIPTION"}));
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link](evt);
}
});
[Link]([Link]);
[Link](new Font("Gabriola", 1, 36));
[Link]("MANAGE CATEGORIES");
[Link](new ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]"));
GroupLayout jPanel3Layout = new GroupLayout(this.jPanel3);
[Link](jPanel3Layout);

[Link]([Link]([Link]).add
Group([Link]().addGroup([Link](Ali
[Link]).addGroup([Link]().addGap(18, 18,
18).addComponent([Link], -2, 129,
-2)).addGroup([Link]().addGap(64, 64,
64).addComponent(this.jLabel4, -2, 162,
-2))).addPreferredGap([Link]).addGroup([Link]
roup([Link]).addGroup([Link]().addGap(70, 70,
70).addComponent(this.jLabel2).addContainerGap()).addGroup([Link]
Group().addGroup([Link]([Link]).addComponent(this.
CatId).addGroup([Link], [Link]().addGap(0, 0,
32767).addComponent([Link], -2, 129, -2).addGap(63, 63,
63))).addPreferredGap([Link]).addGroup([Link]
Group([Link]).addGroup([Link]().addComponent(
[Link], -2, 129, -2).addGap(74, 74, 74).addComponent(this.jButton3, -2, 129,
-2).addGap(94, 94,
94)).addGroup([Link]().addComponent(this.jLabel3, -2, 97,
-2).addPreferredGap([Link]).addComponent([Link], -2, 157,
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 20/64
-2).addGap(115, 115,
115)))))).addGroup([Link]().addContainerGap(-1,
32767).addGroup([Link]([Link]).addGroup(Alignment
.TRAILING, [Link]().addComponent(this.jLabel7, -2, 111,
-2).addPreferredGap([Link]).addComponent([Link], -2, 151,
-2).addGap(291, 291, 291)).addGroup([Link],
[Link]().addComponent(this.jScrollPane1, -2, 696, -2).addGap(57,
57, 57)))).addGroup([Link]().addGap(44, 44,
44).addComponent(this.jLabel1, -2, 302, -2).addGap(55, 55,
55).addComponent(this.jLabel8).addGap(0, 0, 32767)));

[Link]([Link]([Link]).addGr
oup([Link]().addGroup([Link](Align
[Link]).addGroup([Link]().addGroup([Link]
ateParallelGroup([Link]).addGroup([Link]().addGa
p(23, 23,
23).addComponent(this.jLabel1)).addGroup([Link]().addGap(80,
80, 80).addComponent(this.jLabel8))).addPreferredGap([Link], 103,
32767)).addGroup([Link], [Link]().addGap(0, 0,
32767).addGroup([Link]([Link]).addComponent(this.
jLabel4, -2, 31, -2).addComponent([Link], -2, 31,
-2).addComponent(this.jLabel3).addComponent([Link], -2, 31, -2)).addGap(22, 22,
22))).addGroup([Link]([Link]).addComponent([Link]
abel7).addComponent([Link], -2, 32, -2)).addGap(31, 31,
31).addGroup([Link]([Link]).addComponent([Link]
dBtn, -2, 50, -2).addComponent([Link], -2, 52, -2).addComponent([Link], -2, 52,
-2).addComponent(this.jButton3, -2, 52, -2)).addGap(19, 19,
19).addComponent(this.jLabel2).addPreferredGap([Link]).addCom
ponent(this.jScrollPane1, -2, 110, -2).addGap(27, 27, 27)));
[Link](new Font("Gabriola", 1, 24));
[Link](new Color(255, 255, 255));
[Link]("SELLER");
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link].jLabel10MouseClicked(evt);
}
});
[Link](new Font("Gabriola", 1, 24));
[Link](new Color(255, 255, 255));
[Link]("PRODUCTS");
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link].jLabel11MouseClicked(evt);
}
});
[Link](new Font("Times New Roman", 1, 18));
[Link](new ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]"));
[Link]("Logout");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 21/64
}
});
GroupLayout jPanel1Layout = new GroupLayout(this.jPanel1);
[Link](jPanel1Layout);

[Link]([Link]([Link]).add
Group([Link]().addGroup([Link](Ali
[Link]).addGroup([Link],
[Link]().addContainerGap(-1,
32767).addComponent([Link], -2, 24,
-2)).addGroup([Link]().addGroup([Link]
oup([Link]).addGroup([Link]().addGap(21, 21,
21).addGroup([Link]([Link]).addComponent([Link]
el10).addComponent(this.jLabel11)).addPreferredGap([Link], -1,
32767)).addGroup([Link]().addContainerGap(-1,
32767).addComponent([Link]).addGap(36, 36, 36))).addComponent(this.jPanel3, -2, -1,
-2))).addContainerGap()).addGroup([Link]().addGap(466, 466,
466).addComponent(this.jSeparator1, -2, 176, -2).addContainerGap(-1, 32767)));

[Link]([Link]([Link]).addGr
oup([Link]().addGroup([Link](Align
[Link]).addGroup([Link]().addContainerGap().addComp
onent([Link], -2, 22,
-2).addPreferredGap([Link]).addComponent(this.jPanel3, -1, -1,
32767)).addGroup([Link]().addGap(127, 127,
127).addComponent(this.jLabel11).addGap(29, 29,
29).addComponent(this.jLabel10).addPreferredGap([Link], -1,
32767).addComponent([Link]))).addPreferredGap([Link]).add
Component(this.jSeparator1, -2, 10, -2).addContainerGap()));
GroupLayout jPanel2Layout = new GroupLayout(this.jPanel2);
[Link](jPanel2Layout);

[Link]([Link]([Link]).add
Component(this.jPanel1, -1, -1, 32767));

[Link]([Link]([Link]).addCo
mponent(this.jPanel1, -1, -1, 32767));
GroupLayout layout = new GroupLayout([Link]());
[Link]().setLayout(layout);

[Link]([Link]([Link]).addComponent(this
.jPanel2, -1, -1, 32767));

[Link]([Link]([Link]).addComponent([Link]
anel2, -1, -1, 32767));
[Link]();
}

public void SelectSeller() {


try {
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 22/64
"system", "Shravani1508");
[Link] = [Link]();
[Link] = [Link]("Select * from [Link]");
} catch (Exception e) {
[Link]();
}

private void CatIdActionPerformed(ActionEvent evt) {


}

private void CatNameActionPerformed(ActionEvent evt) {


}

private void CatDescActionPerformed(ActionEvent evt) {


}

private void UpdateBtnActionPerformed(ActionEvent evt) {


if (![Link]().isEmpty() && ![Link]().isEmpty() &&
![Link]().isEmpty()) {
try {
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
"system", "Shravani1508");
String var10000 = [Link]();
String Query = "Update [Link] set catname='" + var10000 + "',catdesc ='" +
[Link]() + "'where catid =" + [Link]();
Statement Add = [Link]();
[Link](Query);
[Link](this, "Category Updated");
[Link]();
} catch (Exception e) {
[Link]();
}
} else {
[Link](this, "Missing Information");
}

try {
Vector<String> cols = new Vector();
String[] arr = new String[]{"CATEGORY ID", "CATEGORY Name", "CATEGORY
DESCRIPTION"};

for(int i = 0; i < [Link]; ++i) {


[Link](arr[i]);
}

Vector<Vector> rows = new Vector();


String sql = "select * from Categoryt";
PreparedStatement ps = [Link](sql);
ResultSet rs = [Link]();
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 23/64
while([Link]()) {
int cid = [Link]("CatId");
String cname = [Link]("CatName");
String cdesc = [Link]("CatDesc");
Vector<String> single_row = new Vector();
single_row.add("" + cid);
single_row.add(cname);
single_row.add(cdesc);
[Link](single_row);
}

[Link]();
[Link]();
[Link]();
DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm);
} catch (Exception e) {
[Link]();
}

private void DeleteBtnActionPerformed(ActionEvent evt) {


if ([Link]().isEmpty()) {
[Link](this, "Enter The Category To be Deleted");
} else {
try {
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
"system", "Shravani1508");
String Cid = [Link]();
String Query = "Delete from [Link] where catid=" + Cid;
Statement Add = [Link]();
[Link](Query);
[Link]();
[Link](this, "Category Deleted Successfully");
} catch (Exception ex) {
[Link]();
}
}

try {
Vector<String> cols = new Vector();
String[] arr = new String[]{"CATEGORY ID", "CATEGORY Name", "CATEGORY
DESCRIPTION"};

for(int i = 0; i < [Link]; ++i) {


[Link](arr[i]);
}

Vector<Vector> rows = new Vector();


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 24/64
String sql = "select * from Categoryt";
PreparedStatement ps = [Link](sql);
ResultSet rs = [Link]();

while([Link]()) {
int cid = [Link]("CatId");
String cname = [Link]("CatName");
String cdesc = [Link]("CatDesc");
Vector<String> single_row = new Vector();
single_row.add("" + cid);
single_row.add(cname);
single_row.add(cdesc);
[Link](single_row);
}

[Link]();
[Link]();
[Link]();
DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm);
} catch (Exception e) {
[Link]();
}

private void jButton3ActionPerformed(ActionEvent evt) {


[Link]("");
[Link]("");
[Link]("");
}

private void AddBtnActionPerformed(ActionEvent evt) {


if (![Link]().isEmpty() && ![Link]().isEmpty() &&
![Link]().isEmpty()) {
try {
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
"system", "Shravani1508");
PreparedStatement add = [Link]("insert into categoryt
values(?,?,?)");
[Link](1, [Link]([Link]()));
[Link](2, [Link]());
[Link](3, [Link]());
int row = [Link]();
[Link](this, "Category Added Successfully");
Vector<String> cols = new Vector();
String[] arr = new String[]{"CATEGORY ID", "CATEGORY Name", "CATEGORY
DESCRIPTION"};

for(int i = 0; i < [Link]; ++i) {


[Link](arr[i]);
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 25/64
}

Vector<Vector> rows = new Vector();


String sql = "select * from Categoryt";
PreparedStatement ps = [Link](sql);
ResultSet rs = [Link]();

while([Link]()) {
int cid = [Link]("CatId");
String cname = [Link]("CatName");
String cdesc = [Link]("CatDesc");
Vector<String> single_row = new Vector();
single_row.add("" + cid);
single_row.add(cname);
single_row.add(cdesc);
[Link](single_row);
}

[Link]();
[Link]();
[Link]();
DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm);
} catch (Exception e) {
[Link]();
}
} else {
[Link](this, "Missing Information");
}

private void AddBtnMouseClicked(MouseEvent evt) {


}

private void CategoryTblMouseClicked(MouseEvent evt) {


DefaultTableModel model = (DefaultTableModel)[Link]();
int Myindex = [Link]();
[Link]([Link](Myindex, 0).toString());
[Link]([Link](Myindex, 1).toString());
[Link]([Link](Myindex, 2).toString());
}

private void ExitbtnMouseClicked(MouseEvent evt) {


[Link](0);
}

private void jLabel10MouseClicked(MouseEvent evt) {


(new Seller()).setVisible(true);
[Link]();
}
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 26/64
private void jLabel11MouseClicked(MouseEvent evt) {
(new Productmanage()).setVisible(true);
[Link]();
}

private void jPanel1MouseClicked(MouseEvent evt) {


}

private void LogoutActionPerformed(ActionEvent evt) {


(new Login()).setVisible(true);
[Link]();
}

public static void main(String[] args) {


try {
for([Link] info : [Link]()) {
if ("Nimbus".equals([Link]())) {
[Link]([Link]());
break;
}
}
} catch (ClassNotFoundException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
} catch (InstantiationException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
} catch (IllegalAccessException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
} catch (UnsupportedLookAndFeelException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
}

[Link](new Runnable() {
public void run() {
(new CATEGORIES()).setVisible(true);
}
});
}
} ...//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package supermarket;

import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 27/64
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];

public class Login extends JFrame {


Connection Con = null;
Statement St = null;
ResultSet Rs = null;
private JButton Clearbtn;
private JLabel Exitbtn;
private JButton Loginbtn;
private JComboBox<String> Rolecb;
private JTextField Uid;
private JLabel jLabel1;
private JLabel jLabel10;
private JLabel jLabel11;
private JLabel jLabel2;
private JLabel jLabel3;
private JLabel jLabel4;
private JLabel jLabel5;
private JLabel jLabel7;
private JLabel jLabel9;
private JPanel jPanel1;
private JPanel jPanel2;
private JPasswordField jPasswordField;

public Login() {
[Link]();
}

private void initComponents() {


this.jPanel1 = new JPanel();
this.jLabel9 = new JLabel();
this.jLabel7 = new JLabel();
this.jLabel10 = new JLabel();
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 28/64
this.jLabel11 = new JLabel();
[Link] = new JLabel();
this.jPanel2 = new JPanel();
[Link] = new JTextField();
this.jLabel2 = new JLabel();
this.jLabel3 = new JLabel();
this.jLabel4 = new JLabel();
[Link] = new JButton();
[Link] = new JButton();
this.jLabel5 = new JLabel();
this.jLabel1 = new JLabel();
[Link] = new JComboBox();
[Link] = new JPasswordField();
[Link](3);
[Link](true);
[Link](new Color(0, 0, 0));
[Link](new Font("Gabriola", 1, 48));
[Link](new Color(255, 255, 255));
[Link]("CARTMAX");
[Link](new Font("Times New Roman", 3, 24));
[Link](new Color(255, 255, 255));
[Link]("Your Search");
[Link](new Font("Times New Roman", 3, 24));
[Link](new Color(255, 255, 255));
[Link]("Ends Here......");
[Link](new ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]"));
[Link]("jLabel11");
[Link](new Font("Tahoma", 1, 18));
[Link](new Color(255, 255, 255));
[Link]("X");
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link](evt);
}
});
GroupLayout jPanel1Layout = new GroupLayout(this.jPanel1);
[Link](jPanel1Layout);

[Link]([Link]([Link]).add
Group([Link]().addGroup([Link](Ali
[Link]).addGroup([Link]().addGroup(jPanel1Layout.c
reateParallelGroup([Link]).addGroup([Link]().add
Gap(142, 142,
142).addComponent(this.jLabel10)).addGroup([Link]().addGap(6
5, 65,
65).addGroup([Link]([Link]).addComponent([Link]
el11, -2, 143,
-2).addComponent(this.jLabel9))).addGroup([Link]().addGap(50,
50, 50).addComponent(this.jLabel7))).addGap(0, 82, 32767)).addGroup([Link],
[Link]().addGap(0, 0, 32767).addComponent([Link], -2, 36,
-2))).addContainerGap()));
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 29/64
[Link]([Link]([Link]).addGr
oup([Link]().addContainerGap().addGroup([Link]
ParallelGroup([Link]).addGroup([Link]().addComp
onent([Link]).addGap(379, 379, 379)).addGroup([Link],
[Link]().addComponent(this.jLabel9).addPreferredGap(Compon
[Link]).addComponent(this.jLabel11).addGap(59, 59,
59).addComponent(this.jLabel7).addGap(1, 1,
1))).addComponent(this.jLabel10).addContainerGap(169, 32767)));
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Font("Gabriola", 1, 18));
[Link]("SELECT ROLE");
[Link](new Font("Gabriola", 1, 18));
[Link]("USERID");
[Link](new Font("Gabriola", 1, 18));
[Link]("PASSWORD");
[Link](new Font("Gabriola", 1, 18));
[Link]("LOGIN");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Font("Gabriola", 1, 18));
[Link]("CLEAR");
[Link](new ImageIcon("C:\\Users\\shrav\\Downloads\\shopping [Link]"));
[Link](new Font("Gabriola", 1, 36));
[Link]("LOGIN HERE");
[Link](new Font("Times New Roman", 1, 10));
[Link](new DefaultComboBoxModel(new String[]{"ADMIN ", "SELLER",
"RECEPTIONIST"}));
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
GroupLayout jPanel2Layout = new GroupLayout(this.jPanel2);
[Link](jPanel2Layout);

[Link]([Link]([Link]).add
Group([Link], [Link]().addContainerGap(26,
32767).addGroup([Link]([Link]).addGroup(jPanel2La
[Link]().addGroup([Link]([Link]
G).addGroup([Link]().addComponent(this.jLabel2, -2, 162,
-2).addPreferredGap([Link], -1,
32767)).addGroup([Link], [Link]().addGap(0, 0,
32767).addGroup([Link]([Link]).addComponent(this.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 30/64
jLabel4, -2, 162, -2).addComponent(this.jLabel3, -2, 162, -2)).addGap(38, 38,
38))).addGroup([Link]([Link],
false).addComponent([Link], -1, 111, 32767).addComponent([Link], 0, 111,
32767).addComponent([Link])).addContainerGap(38,
32767)).addGroup([Link], [Link]().addGap(0, 21,
32767).addComponent([Link], -2, 121, -2).addGap(37, 37,
37).addComponent([Link], -2, 111, -2).addGap(60, 60,
60)))).addGroup([Link]().addGroup([Link]
Group([Link]).addGroup([Link]().addGap(130,
130,
130).addComponent(this.jLabel5)).addGroup([Link]().addGap(82
, 82, 82).addComponent(this.jLabel1, -2, 201, -2))).addContainerGap(-1, 32767)));

[Link]([Link]([Link]).addGr
oup([Link]().addContainerGap().addComponent(this.jLabel1).ad
dGroup([Link]([Link]).addGroup([Link]
eSequentialGroup().addGap(262, 262, 262).addComponent([Link], -2, 35,
-2)).addGroup([Link]().addGap(18, 18,
18).addComponent(this.jLabel5, -2, 128,
-2).addPreferredGap([Link]).addGroup([Link]
oup([Link]).addComponent(this.jLabel2, -2, 46, -2).addComponent([Link], -2,
39,
-2)).addPreferredGap([Link]).addGroup([Link]
elGroup([Link]).addComponent(this.jLabel3, -2, 50, -2).addComponent([Link],
-2, 33, -2)).addPreferredGap([Link]).addComponent(this.jLabel4, -2,
43, -2))).addGap(72, 72,
72).addGroup([Link]([Link]).addComponent([Link]
inbtn).addComponent([Link])).addContainerGap(87, 32767)));
GroupLayout layout = new GroupLayout([Link]());
[Link]().setLayout(layout);

[Link]([Link]([Link]).addGroup(Alignme
[Link], [Link]().addComponent(this.jPanel2, -1, -1,
32767).addGap(18, 18, 18).addComponent(this.jPanel1, -2, -1, -2)));

[Link]([Link]([Link]).addGroup([Link]
eSequentialGroup().addContainerGap().addGroup([Link]([Link]
NG).addComponent(this.jPanel2, -2, -1, -2).addComponent(this.jPanel1, -2, -1,
-2)).addContainerGap()));
[Link]();
[Link]((Component)null);
}

private void LoginbtnActionPerformed(ActionEvent evt) {


String role = ((String)[Link]()).trim();
String pass = (new String([Link]())).trim();
String uid = [Link]().trim();
[Link](this, role + " " + uid + " " + pass);
if ([Link]("ADMIN") && [Link]("Admin") && [Link]("1111")) {
(new Seller()).setVisible(true);
[Link]();
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 31/64
} else if ([Link]("RECEPTIONIST") && [Link]("Receptionist") && [Link]("2222"))
{
(new Billing()).setVisible(true);
[Link]();
} else if ([Link]("SELLER")) {
try {
String Query = "select * from [Link] where selname = '" + uid + "' and selpass =
'" + pass + "'";
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL",
"system", "Shravani1508");
[Link] = [Link]();
[Link] = [Link](Query);
if (![Link]()) {
[Link](this, "Wrong Seller Id Or Password");
} else {
(new Productmanage()).setVisible(true);
[Link]();
}
} catch (Exception ex) {
[Link]();
}
}

private void UidActionPerformed(ActionEvent evt) {


}

private void RolecbActionPerformed(ActionEvent evt) {


}

private void ExitbtnMouseClicked(MouseEvent evt) {


[Link](0);
}

public static void main(String[] args) {


// $FF: Couldn't be decompiled
}
} ....dont reply wait let me send all code

wait..m sending codes in chunks.. so wait till i finish

Got it 👍 no rush — send me the code chunks one by one.


I’ll wait until you finish sending everything, and then I’ll start explaining clearly.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 32/64
internship in advanced java laerant java swing and jdbc, orcale db.....will give u project codes
...explain entire project in sratch allcoes ..explain project objective purpose . y did u make it and
tools used ide used and eveything ...eplain the project details very minutely...dont generate
anything i will sned code first till then wait once i finish sending then repsond to it plsss...// //
Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) //
package supermarket; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import
[Link]; import [Link]; import [Link];
import [Link]; import [Link]; import [Link];
import [Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link];
import [Link]; import [Link]; import [Link];
import [Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link];
import [Link]; import
[Link]; public class Billing extends JFrame { Connection Con =
null; Statement St = null; ResultSet Rs = null; int prid; int newqty; int i = 0; Double Uprice; Double
ProdTot = (double)0.0F; Double GrdTotal = (double)0.0F; int AvailQty; private JButton ADDbtn;
private JTextArea BillText; private JButton Clearbtn; private JLabel Close; private JButton Filterbtn;
private JLabel Grdtotlbl; private JButton Logout; private JButton Printbtn; private JTextField
Prodqty; private JTextField Prodqty1; private JTextField Prodqty2; private JTable ProductTable;
private JComboBox<String> Productcb; private JTextField Productname; private JButton
RefreshBtn; private JTextField billid; private JLabel jLabel1; private JLabel jLabel2; private JLabel
jLabel3; private JLabel jLabel4; private JLabel jLabel5; private JLabel jLabel6; private JLabel
jLabel7; private JPanel jPanel1; private JPanel jPanel2; private JScrollPane jScrollPane1; private
JScrollPane jScrollPane2; public Billing() { [Link](); [Link](); [Link]();
try { Vector<String> cols = new Vector(); String[] arr = new String[]{"PROD ID", "PROD NAME",
"QUANTITY", " PRICE", "CATEGORY"}; for(int i = 0; i < [Link]; ++i) { [Link](arr[i]); }
Vector<Vector> rows = new Vector(); String sql = "select * from Productmt"; PreparedStatement
ps = [Link](sql); ResultSet rs = [Link](); while([Link]()) { int pid =
[Link]("prodid"); String pname = [Link]("prodname"); String pqty =
[Link]("prodqt"); String price = [Link]("prodprc"); String cat = [Link]("prodcat");
Vector<String> single_row = new Vector(); single_row.add("" + pid); single_row.add(pname);
single_row.add(pqty); single_row.add(price); single_row.add(cat); [Link](single_row); }
[Link](); [Link](); DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm); } catch (Exception ex) { [Link](); } } private void
initComponents() { this.jPanel1 = new JPanel(); this.jPanel2 = new JPanel(); this.jLabel1 = new
JLabel(); this.jLabel2 = new JLabel(); this.jLabel3 = new JLabel(); this.jLabel4 = new JLabel();
[Link] = new JTextField(); [Link] = new JTextField(); [Link] = new JTextField();
this.jLabel7 = new JLabel(); [Link] = new JButton(); [Link] = new JButton();
[Link] = new JButton(); this.jScrollPane2 = new JScrollPane(); [Link] = new JTextArea();
[Link] = new JButton(); [Link] = new JComboBox(); this.Prodqty1 = new
JTextField(); this.Prodqty2 = new JTextField(); this.jScrollPane1 = new JScrollPane();
[Link] = new JTable(); [Link] = new JLabel(); [Link] = new JButton();
this.jLabel6 = new JLabel(); this.jLabel5 = new JLabel(); [Link] = new JLabel(); [Link] =
new JButton(); [Link](3); [Link](new Color(0, 0, 0));
[Link](new Font("Gabriola", 1, 36)); [Link]("BILLING POINT");

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 33/64
[Link](new Font("Times New Roman", 1, 16)); [Link]("BILLID");
[Link](new Font("Times New Roman", 1, 16)); [Link]("NAME");
[Link](new Font("Times New Roman", 1, 16)); [Link]("QUANTITY");
[Link](new ActionListener() { public void actionPerformed(ActionEvent evt)
{ [Link](evt); } }); [Link](new
ActionListener() { public void actionPerformed(ActionEvent evt) {
[Link](evt); } }); [Link]("0");
[Link](new Font("Gabriola", 1, 24)); [Link]("PRODUCT LIST");
[Link](new Color(153, 153, 153)); [Link](new
Font("Gabriola", 1, 18)); [Link]("ADD TO BILL");
[Link](new MouseAdapter() { public void mouseClicked(MouseEvent
evt) { [Link](evt); } }); [Link](new
ActionListener() { public void actionPerformed(ActionEvent evt) {
[Link](evt); } }); [Link](new Color(153,
153, 153)); [Link](new Font("Times New Roman", 1, 18));
[Link]("Refresh"); [Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) { [Link](evt); } });
[Link](new Color(153, 153, 153)); [Link](new
Font("Gabriola", 1, 18)); [Link]("CLEAR"); [Link](new
ActionListener() { public void actionPerformed(ActionEvent evt) {
[Link](evt); } }); [Link](20);
[Link](new Font("Times New Roman", 1, 18)); [Link](5);
[Link]([Link]); [Link](new Color(153, 153,
153)); [Link](new Font("Gabriola", 1, 18)); [Link]("PRINT");
[Link](new ActionListener() { public void actionPerformed(ActionEvent
evt) { [Link](evt); } }); [Link](new Font("Times New
Roman", 1, 14)); [Link](new ItemListener() { public void
itemStateChanged(ItemEvent evt) { [Link](evt); } });
[Link](new ActionListener() { public void
actionPerformed(ActionEvent evt) { [Link](evt); } });
[Link]([Link]());
[Link](new Font("Times New Roman", 1, 14));
[Link](new DefaultTableModel(new Object[0][], new String[]{"PRODID",
"PRODNAME", "PRODQTY", "PRODPRICE", "PRODCAT"}));
[Link](new MouseAdapter() { public void
mouseClicked(MouseEvent evt) { [Link](evt); } });
[Link]([Link]); [Link](new Font("Times
New Roman", 1, 24)); [Link]("\nRs"); [Link](new Font("Times New
Roman", 1, 18)); [Link]("Filter"); [Link](new
ActionListener() { public void actionPerformed(ActionEvent evt) {
[Link](evt); } }); [Link](new
ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]")); GroupLayout jPanel2Layout = new
GroupLayout(this.jPanel2); [Link](jPanel2Layout);
[Link]([Link]([Link]).add
Group([Link]().addGroup([Link](Ali
[Link]).addGroup([Link]().addGap(42, 42,
42).addGroup([Link]([Link]).addComponent([Link]
el4).addGroup([Link]([Link]).addComponent([Link]
bel2).addComponent(this.jLabel3)))).addGroup([Link]().addGap(
21, 21, 21).addComponent([Link], -2, 125,
-2))).addGroup([Link]([Link]).addGroup(jPanel2Layou
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 34/64
[Link]().addGap(191, 191, 191).addComponent(this.jScrollPane1, -2, -1,
-2)).addGroup([Link]().addGap(4, 4,
4).addGroup([Link]([Link]).addGroup(jPanel2Layout.
createSequentialGroup().addGroup([Link]([Link]).ad
dComponent(this.jLabel7).addGroup([Link]().addComponent(thi
s.jLabel6).addGap(62, 62, 62).addComponent(this.jLabel1, -2, 207,
-2)).addGroup([Link]().addGroup([Link]
oup([Link]).addComponent([Link], -2, 117,
-2).addComponent([Link], -2, 117, -2).addComponent([Link], -2, 117,
-2).addComponent([Link], -2, 111, -2)).addGap(57, 57, 57).addComponent([Link],
-2, 121, -2).addGap(22, 22, 22).addComponent([Link], -2, 127, -2))).addGap(37, 37,
37).addComponent([Link], -2, 106,
-2)).addGroup([Link]([Link],
false).addGroup([Link], [Link]().addGap(33, 33,
33).addComponent([Link], -2, 106, -2).addPreferredGap([Link],
-1, 32767).addComponent([Link], -2, 106, -2)).addGroup([Link],
[Link]().addGap(25, 25, 25).addComponent(this.jScrollPane2, -2,
494, -2)))))).addContainerGap(123,
32767)).addGroup([Link]([Link]).addGroup(jPanel2La
[Link]().addGap(251, 251, 251).addComponent(this.Prodqty1, -1, 63,
32767).addGap(521, 521,
521))).addGroup([Link]([Link]).addGroup(jPanel2Lay
[Link]().addGap(261, 261, 261).addComponent(this.Prodqty2, -1, 63,
32767).addGap(511, 511, 511))));
[Link]([Link]([Link]).addGr
oup([Link]().addGap(27, 27,
27).addGroup([Link]([Link]).addGroup(jPanel2Layout
.createSequentialGroup().addGap(28, 28, 28).addComponent(this.jLabel1).addGap(55, 55,
55).addComponent(this.jLabel7)).addComponent(this.jLabel6, -2, 138,
-2)).addGroup([Link]([Link]).addGroup(jPanel2Layout
.createSequentialGroup().addGap(28, 28,
28).addGroup([Link]([Link]).addComponent([Link]
ductcb, -2, 29, -2).addComponent([Link], -2, 32,
-2).addComponent([Link]))).addGroup([Link]().addGap
(38, 38,
38).addGroup([Link]([Link]).addComponent([Link]
d, -2, 33, -2).addComponent(this.jLabel2)))).addGap(18, 18,
18).addGroup([Link]([Link]).addGroup([Link]
AILING, [Link]().addComponent(this.jScrollPane1, -2, 135,
-2).addGap(56, 56, 56)).addGroup([Link],
[Link]().addGroup([Link](Alignmen
[Link]).addComponent([Link], -2, 34,
-2).addComponent(this.jLabel3)).addGap(26, 26,
26).addGroup([Link]([Link]).addComponent([Link]
bel4).addComponent([Link], -2, 30, -2)).addGap(32, 32,
32).addGroup([Link]([Link]).addComponent([Link]
Dbtn).addComponent([Link])).addGap(29, 29, 29))).addComponent(this.jScrollPane2, -2,
228, -2).addGap(18, 18,
18).addGroup([Link]([Link]).addComponent([Link]
otlbl).addComponent([Link])).addContainerGap(27,
32767)).addGroup([Link]([Link]).addGroup(jPanel2La
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 35/64
[Link]().addGap(209, 209, 209).addComponent(this.Prodqty1, -2, 0,
-2).addContainerGap(600,
32767))).addGroup([Link]([Link]).addGroup(jPanel2L
[Link]().addGap(219, 219, 219).addComponent(this.Prodqty2, -2, 0,
-2).addContainerGap(590, 32767)))); [Link](new Color(255, 255, 255));
[Link](new Font("Times New Roman", 1, 18)); [Link](new
Color(255, 255, 255)); [Link]("x"); [Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) { [Link](evt); } });
[Link](new Font("Times New Roman", 1, 18)); [Link](new
ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]")); [Link]("Logout");
[Link](new ActionListener() { public void actionPerformed(ActionEvent
evt) { [Link](evt); } }); GroupLayout jPanel1Layout = new
GroupLayout(this.jPanel1); [Link](jPanel1Layout);
[Link]([Link]([Link]).add
Group([Link]().addContainerGap(-1,
32767).addGroup([Link]([Link]).addGroup(Alignment
.TRAILING,
[Link]().addGroup([Link](Alignmen
[Link]).addGroup([Link]().addComponent(this.jLabel5, -2,
31, -2).addGap(109, 109,
109)).addGroup([Link]().addComponent([Link]).addPreferr
edGap([Link]))).addComponent(this.jPanel2, -2, -1, -2).addGap(36, 36,
36)).addGroup([Link],
[Link]().addComponent([Link], -2, 20, -2).addGap(52, 52,
52)))));
[Link]([Link]([Link]).addGr
oup([Link]().addGap(4, 4, 4).addComponent([Link], -2, 20,
-2).addPreferredGap([Link]).addComponent(this.jPanel2, -2, -1,
-2).addContainerGap(-1, 32767)).addGroup([Link]().addGap(88,
88, 88).addComponent(this.jLabel5).addPreferredGap([Link], 632,
32767).addComponent([Link]).addGap(124, 124, 124))); GroupLayout layout = new
GroupLayout([Link]()); [Link]().setLayout(layout);
[Link]([Link]([Link]).addComponent(this
.jPanel1, -2, -1, -2));
[Link]([Link]([Link]).addGroup(Alignment.T
RAILING, [Link]().addComponent(this.jPanel1, -2, -1, -2).addGap(0, 0,
32767))); [Link](); } public void SelectSeller() { try { [Link] =
[Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); [Link] = [Link](); [Link] = [Link]("Select *
from [Link]"); } catch (Exception e) { [Link](); } } public void update() { try
{ [Link] = [Link] - [Link]([Link]()); [Link] =
[Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); String Query = "Update [Link] set PRODQT='" + [Link] +
"'where PRODID=" + [Link]; Statement Add = [Link]();
[Link](Query); [Link](); } catch (Exception e) { [Link](); } }
private void ADDbtnMouseClicked(MouseEvent evt) { } private void
ADDbtnActionPerformed(ActionEvent evt) { if (![Link]().isEmpty() &&
![Link]().isEmpty()) { if ((double)[Link] <=
[Link]([Link]())) { [Link](this, "Not Enough In
Stock"); } else { ++this.i; [Link] = [Link] * [Link]([Link]());
[Link] = [Link] + [Link]; if (this.i == 1) { JTextArea var10000 = [Link];
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 36/64
String var10001 = [Link](); [Link](var10001 +
"*********************CARTMAX*********************\t\n
NUM\tPRODUCT\tPRICE\t\tQUANTITY\tTOTAL\n" + this.i + "\t" + [Link]() +
"\t" + [Link] + "\t" + [Link]() + "\t" + [Link] + "\n"); } else { JTextArea
var17 = [Link]; String var18 = [Link](); [Link](var18 + this.i + "\t" +
[Link]() + "\t" + [Link] + "\t" + [Link]() + "\t" + [Link]
+ "\n"); } [Link]("Rs" + [Link]); [Link](); } } else {
[Link](this, "Missing Information"); } try { Vector<String> cols = new
Vector(); String[] arr = new String[]{"PROD ID", "PROD NAME", "QUANTITY", " PRICE",
"CATEGORY"}; for(int i = 0; i < [Link]; ++i) { [Link](arr[i]); } Vector<Vector> rows = new
Vector(); String sql = "select * from Productmt"; PreparedStatement ps =
[Link](sql); ResultSet rs = [Link](); while([Link]()) { int pid =
[Link]("prodid"); String pname = [Link]("prodname"); String pqty =
[Link]("prodqt"); String price = [Link]("prodprc"); String cat = [Link]("prodcat");
Vector<String> single_row = new Vector(); single_row.add("" + pid); single_row.add(pname);
single_row.add(pqty); single_row.add(price); single_row.add(cat); [Link](single_row); }
[Link](); [Link](); DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm); } catch (Exception ex) { [Link](); } } private void
RefreshBtnActionPerformed(ActionEvent evt) { try { Vector<String> cols = new Vector(); String[]
arr = new String[]{"PROD ID", "PROD NAME", "QUANTITY", " PRICE", "CATEGORY"}; for(int i = 0; i
< [Link]; ++i) { [Link](arr[i]); } Vector<Vector> rows = new Vector(); [Link] =
[Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); String sql = "select * from Productmt"; PreparedStatement ps =
[Link](sql); ResultSet rs = [Link](); while([Link]()) { int pid =
[Link]("prodid"); String pname = [Link]("prodname"); String pqty =
[Link]("prodqt"); String price = [Link]("prodprc"); String cat = [Link]("prodcat");
Vector<String> single_row = new Vector(); single_row.add("" + pid); single_row.add(pname);
single_row.add(pqty); single_row.add(price); single_row.add(cat); [Link](single_row); }
[Link](); [Link](); DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm); } catch (Exception ex) { [Link](); } } private void
ClearbtnActionPerformed(ActionEvent evt) { [Link]("");
[Link](""); [Link](""); } private void
PrintbtnActionPerformed(ActionEvent evt) { try { JTextArea var10000 = [Link]; String
var10001 = [Link](); [Link](var10001 + "\nGrand Total = " + [Link]
+ "\n"); [Link](); } catch (Exception e) { [Link](); } } private void
ProductnameActionPerformed(ActionEvent evt) { } private void GetCat() { try { [Link] =
[Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); [Link] = [Link](); String query = "Select * from
[Link]"; [Link] = [Link](query); while([Link]()) { String Mycat =
[Link]("catname"); [Link](Mycat); } } catch (Exception e) {
[Link](); } } private void ProductTableMouseClicked(MouseEvent evt) {
DefaultTableModel model = (DefaultTableModel)[Link](); int Myindex =
[Link](); [Link] = [Link]([Link](Myindex,
0).toString()); [Link] = [Link]([Link](Myindex, 2).toString());
[Link] = [Link] - [Link]([Link]());
[Link]([Link](Myindex, 1).toString()); [Link] =
[Link]([Link](Myindex, 3).toString()); [Link] = [Link] *
(double)[Link]([Link]()); } private void
ProductcbActionPerformed(ActionEvent evt) { } private void billidActionPerformed(ActionEvent
evt) { } private void ProductcbItemStateChanged(ItemEvent evt) { } private void
FilterbtnActionPerformed(ActionEvent evt) { try { [Link] =
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 37/64
[Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); [Link] = [Link](); String product_type =
((String)[Link]()).trim().toUpperCase(); [Link] =
[Link]("Select * from [Link] where prodcat ='" + product_type + "'");
Vector<String> cols = new Vector(); String[] arr = new String[]{"PROD ID", "PROD NAME",
"QUANTITY", " PRICE", "CATEGORY"}; for(int i = 0; i < [Link]; ++i) { [Link](arr[i]); }
Vector<Vector> rows = new Vector(); while([Link]()) { int pid = [Link]("prodid");
String pname = [Link]("prodname"); String pqty = [Link]("prodqt"); String
price = [Link]("prodprc"); String cat = [Link]("prodcat"); Vector<String>
single_row = new Vector(); single_row.add("" + pid); single_row.add(pname);
single_row.add(pqty); single_row.add(price); single_row.add(cat); [Link](single_row); }
[Link](); [Link](); DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm); } catch (Exception e) { [Link](); } } private void
CloseMouseClicked(MouseEvent evt) { [Link](0); } private void
LogoutActionPerformed(ActionEvent evt) { (new Login()).setVisible(true); [Link](); } public
static void main(String[] args) { try { for([Link] info :
[Link]()) { if ("Nimbus".equals([Link]())) {
[Link]([Link]()); break; } } } catch (ClassNotFoundException ex)
{ [Link]([Link]()).log([Link], (String)null, ex); } catch
(InstantiationException ex) { [Link]([Link]()).log([Link],
(String)null, ex); } catch (IllegalAccessException ex) {
[Link]([Link]()).log([Link], (String)null, ex); } catch
(UnsupportedLookAndFeelException ex) {
[Link]([Link]()).log([Link], (String)null, ex); }
[Link](new Runnable() { public void run() { (new Billing()).setVisible(true); } }); }
} ....// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower
decompiler) // package supermarket; import [Link]; import [Link];
import [Link]; import [Link]; import [Link];
import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import
[Link]; import [Link];
import [Link]; import
[Link]; public class CATEGORIES extends JFrame { Connection
Con = null; Statement St = null; ResultSet Rs = null; private JButton AddBtn; private JTextField
CatDesc; private JTextField CatId; private JTextField CatName; private JTable CategoryTbl; private
JButton DeleteBtn; private JLabel Exitbtn; private JButton Logout; private JButton UpdateBtn;
private JButton jButton3; private JLabel jLabel1; private JLabel jLabel10; private JLabel jLabel11;
private JLabel jLabel2; private JLabel jLabel3; private JLabel jLabel4; private JLabel jLabel7;
private JLabel jLabel8; private JPanel jPanel1; private JPanel jPanel2; private JPanel jPanel3;
private JScrollPane jScrollPane1; private JSeparator jSeparator1; public CATEGORIES() {
[Link](); [Link](); try { Vector<String> cols = new Vector(); String[] arr =
new String[]{"CATEGORY ID", "CATEGORY Name", "CATEGORY DESCRIPTION"}; for(int i = 0; i <
[Link]; ++i) { [Link](arr[i]); } Vector<Vector> rows = new Vector(); String sql = "select * from
Categoryt"; PreparedStatement ps = [Link](sql); ResultSet rs =
[Link](); while([Link]()) { int cid = [Link]("CatId"); String cname =
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 38/64
[Link]("CatName"); String cdesc = [Link]("CatDesc"); Vector<String> single_row =
new Vector(); single_row.add("" + cid); single_row.add(cname); single_row.add(cdesc);
[Link](single_row); } [Link](); [Link](); [Link](); DefaultTableModel dtm = new
DefaultTableModel(rows, cols); [Link](dtm); } catch (Exception e) {
[Link](); } } private void initComponents() { this.jPanel2 = new JPanel(); this.jPanel1 =
new JPanel(); [Link] = new JLabel(); this.jPanel3 = new JPanel(); this.jLabel2 = new JLabel();
this.jLabel3 = new JLabel(); [Link] = new JTextField(); this.jLabel4 = new JLabel(); [Link]
= new JTextField(); this.jLabel7 = new JLabel(); [Link] = new JTextField(); [Link] =
new JButton(); [Link] = new JButton(); this.jButton3 = new JButton(); [Link] = new
JButton(); this.jScrollPane1 = new JScrollPane(); [Link] = new JTable(); this.jLabel8 =
new JLabel(); this.jLabel1 = new JLabel(); this.jSeparator1 = new JSeparator(); this.jLabel10 = new
JLabel(); this.jLabel11 = new JLabel(); [Link] = new JButton();
[Link](3); [Link](new Color(0, 0, 0));
[Link](new MouseAdapter() { public void mouseClicked(MouseEvent
evt) { [Link].jPanel1MouseClicked(evt); } }); [Link](new Font("Tahoma", 0,
18)); [Link](new Color(255, 255, 255)); [Link]("x");
[Link](new MouseAdapter() { public void mouseClicked(MouseEvent
evt) { [Link](evt); } }); [Link](new Font("Gabriola",
1, 24)); [Link]("CATEGORIES LIST"); [Link](new Font("Gabriola", 1, 18));
[Link]("NAME"); [Link](new ActionListener() { public void
actionPerformed(ActionEvent evt) { [Link](evt); } });
[Link](new Font("Gabriola", 1, 18)); [Link]("CATEGORIES ID");
[Link](new ActionListener() { public void actionPerformed(ActionEvent
evt) { [Link](evt); } }); [Link](new
Font("Gabriola", 1, 18)); [Link]("DESCRIPTION");
[Link](new ActionListener() { public void actionPerformed(ActionEvent
evt) { [Link](evt); } }); [Link](new
Color(153, 153, 153)); [Link](new Font("Gabriola", 1, 18));
[Link]("UPDATE"); [Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt); } }); [Link](new
Color(153, 153, 153)); [Link](new Font("Gabriola", 1, 18));
[Link]("DELETE"); [Link](new ActionListener() { public
void actionPerformed(ActionEvent evt) { [Link](evt); } });
[Link](new Color(153, 153, 153)); [Link](new
Font("Gabriola", 1, 18)); [Link]("CLEAR"); [Link](new
ActionListener() { public void actionPerformed(ActionEvent evt) {
[Link].jButton3ActionPerformed(evt); } }); [Link](new Color(153,
153, 153)); [Link](new Font("Gabriola", 1, 18)); [Link]("ADD");
[Link](new MouseAdapter() { public void mouseClicked(MouseEvent
evt) { [Link](evt); } }); [Link](new
ActionListener() { public void actionPerformed(ActionEvent evt) {
[Link](evt); } }); [Link](new Font("Times
New Roman", 1, 14)); [Link](new DefaultTableModel(new Object[][]{{null,
null, null}, {null, null, null}, {null, null, null}, {null, null, null}}, new String[]{"ID", "NAME",
"DESCRIPTION"})); [Link](new MouseAdapter() { public void
mouseClicked(MouseEvent evt) { [Link](evt); } });
[Link]([Link]); [Link](new Font("Gabriola", 1,
36)); [Link]("MANAGE CATEGORIES"); [Link](new
ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]")); GroupLayout jPanel3Layout = new
GroupLayout(this.jPanel3); [Link](jPanel3Layout);
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 39/64
[Link]([Link]([Link]).add
Group([Link]().addGroup([Link](Ali
[Link]).addGroup([Link]().addGap(18, 18,
18).addComponent([Link], -2, 129,
-2)).addGroup([Link]().addGap(64, 64,
64).addComponent(this.jLabel4, -2, 162,
-2))).addPreferredGap([Link]).addGroup([Link]
roup([Link]).addGroup([Link]().addGap(70, 70,
70).addComponent(this.jLabel2).addContainerGap()).addGroup([Link]
Group().addGroup([Link]([Link]).addComponent(this.
CatId).addGroup([Link], [Link]().addGap(0, 0,
32767).addComponent([Link], -2, 129, -2).addGap(63, 63,
63))).addPreferredGap([Link]).addGroup([Link]
Group([Link]).addGroup([Link]().addComponent(
[Link], -2, 129, -2).addGap(74, 74, 74).addComponent(this.jButton3, -2, 129,
-2).addGap(94, 94,
94)).addGroup([Link]().addComponent(this.jLabel3, -2, 97,
-2).addPreferredGap([Link]).addComponent([Link], -2, 157,
-2).addGap(115, 115,
115)))))).addGroup([Link]().addContainerGap(-1,
32767).addGroup([Link]([Link]).addGroup(Alignment
.TRAILING, [Link]().addComponent(this.jLabel7, -2, 111,
-2).addPreferredGap([Link]).addComponent([Link], -2, 151,
-2).addGap(291, 291, 291)).addGroup([Link],
[Link]().addComponent(this.jScrollPane1, -2, 696, -2).addGap(57,
57, 57)))).addGroup([Link]().addGap(44, 44,
44).addComponent(this.jLabel1, -2, 302, -2).addGap(55, 55,
55).addComponent(this.jLabel8).addGap(0, 0, 32767)));
[Link]([Link]([Link]).addGr
oup([Link]().addGroup([Link](Align
[Link]).addGroup([Link]().addGroup([Link]
ateParallelGroup([Link]).addGroup([Link]().addGa
p(23, 23,
23).addComponent(this.jLabel1)).addGroup([Link]().addGap(80,
80, 80).addComponent(this.jLabel8))).addPreferredGap([Link], 103,
32767)).addGroup([Link], [Link]().addGap(0, 0,
32767).addGroup([Link]([Link]).addComponent(this.
jLabel4, -2, 31, -2).addComponent([Link], -2, 31,
-2).addComponent(this.jLabel3).addComponent([Link], -2, 31, -2)).addGap(22, 22,
22))).addGroup([Link]([Link]).addComponent([Link]
abel7).addComponent([Link], -2, 32, -2)).addGap(31, 31,
31).addGroup([Link]([Link]).addComponent([Link]
dBtn, -2, 50, -2).addComponent([Link], -2, 52, -2).addComponent([Link], -2, 52,
-2).addComponent(this.jButton3, -2, 52, -2)).addGap(19, 19,
19).addComponent(this.jLabel2).addPreferredGap([Link]).addCom
ponent(this.jScrollPane1, -2, 110, -2).addGap(27, 27, 27))); [Link](new
Font("Gabriola", 1, 24)); [Link](new Color(255, 255, 255));
[Link]("SELLER"); [Link](new MouseAdapter() { public
void mouseClicked(MouseEvent evt) { [Link].jLabel10MouseClicked(evt); } });
[Link](new Font("Gabriola", 1, 24)); [Link](new Color(255,
255, 255)); [Link]("PRODUCTS"); [Link](new
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 40/64
MouseAdapter() { public void mouseClicked(MouseEvent evt) {
[Link].jLabel11MouseClicked(evt); } }); [Link](new Font("Times New
Roman", 1, 18)); [Link](new
ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]")); [Link]("Logout");
[Link](new ActionListener() { public void actionPerformed(ActionEvent
evt) { [Link](evt); } }); GroupLayout jPanel1Layout = new
GroupLayout(this.jPanel1); [Link](jPanel1Layout);
[Link]([Link]([Link]).add
Group([Link]().addGroup([Link](Ali
[Link]).addGroup([Link],
[Link]().addContainerGap(-1,
32767).addComponent([Link], -2, 24,
-2)).addGroup([Link]().addGroup([Link]
oup([Link]).addGroup([Link]().addGap(21, 21,
21).addGroup([Link]([Link]).addComponent([Link]
el10).addComponent(this.jLabel11)).addPreferredGap([Link], -1,
32767)).addGroup([Link]().addContainerGap(-1,
32767).addComponent([Link]).addGap(36, 36, 36))).addComponent(this.jPanel3, -2, -1,
-2))).addContainerGap()).addGroup([Link]().addGap(466, 466,
466).addComponent(this.jSeparator1, -2, 176, -2).addContainerGap(-1, 32767)));
[Link]([Link]([Link]).addGr
oup([Link]().addGroup([Link](Align
[Link]).addGroup([Link]().addContainerGap().addComp
onent([Link], -2, 22,
-2).addPreferredGap([Link]).addComponent(this.jPanel3, -1, -1,
32767)).addGroup([Link]().addGap(127, 127,
127).addComponent(this.jLabel11).addGap(29, 29,
29).addComponent(this.jLabel10).addPreferredGap([Link], -1,
32767).addComponent([Link]))).addPreferredGap([Link]).add
Component(this.jSeparator1, -2, 10, -2).addContainerGap())); GroupLayout jPanel2Layout = new
GroupLayout(this.jPanel2); [Link](jPanel2Layout);
[Link]([Link]([Link]).add
Component(this.jPanel1, -1, -1, 32767));
[Link]([Link]([Link]).addCo
mponent(this.jPanel1, -1, -1, 32767)); GroupLayout layout = new
GroupLayout([Link]()); [Link]().setLayout(layout);
[Link]([Link]([Link]).addComponent(this
.jPanel2, -1, -1, 32767));
[Link]([Link]([Link]).addComponent([Link]
anel2, -1, -1, 32767)); [Link](); } public void SelectSeller() { try { [Link] =
[Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); [Link] = [Link](); [Link] = [Link]("Select *
from [Link]"); } catch (Exception e) { [Link](); } } private void
CatIdActionPerformed(ActionEvent evt) { } private void CatNameActionPerformed(ActionEvent
evt) { } private void CatDescActionPerformed(ActionEvent evt) { } private void
UpdateBtnActionPerformed(ActionEvent evt) { if (![Link]().isEmpty() &&
![Link]().isEmpty() && ![Link]().isEmpty()) { try { [Link] =
[Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); String var10000 = [Link](); String Query = "Update
[Link] set catname='" + var10000 + "',catdesc ='" + [Link]() + "'where
catid =" + [Link](); Statement Add = [Link]();
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 41/64
[Link](Query); [Link](this, "Category Updated");
[Link](); } catch (Exception e) { [Link](); } } else {
[Link](this, "Missing Information"); } try { Vector<String> cols = new
Vector(); String[] arr = new String[]{"CATEGORY ID", "CATEGORY Name", "CATEGORY
DESCRIPTION"}; for(int i = 0; i < [Link]; ++i) { [Link](arr[i]); } Vector<Vector> rows = new
Vector(); String sql = "select * from Categoryt"; PreparedStatement ps =
[Link](sql); ResultSet rs = [Link](); while([Link]()) { int cid =
[Link]("CatId"); String cname = [Link]("CatName"); String cdesc =
[Link]("CatDesc"); Vector<String> single_row = new Vector(); single_row.add("" + cid);
single_row.add(cname); single_row.add(cdesc); [Link](single_row); } [Link](); [Link]();
[Link](); DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm); } catch (Exception e) { [Link](); } } private void
DeleteBtnActionPerformed(ActionEvent evt) { if ([Link]().isEmpty()) {
[Link](this, "Enter The Category To be Deleted"); } else { try {
[Link] = [Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); String Cid = [Link](); String Query = "Delete from [Link]
where catid=" + Cid; Statement Add = [Link](); [Link](Query);
[Link](); [Link](this, "Category Deleted Successfully"); }
catch (Exception ex) { [Link](); } } try { Vector<String> cols = new Vector(); String[] arr
= new String[]{"CATEGORY ID", "CATEGORY Name", "CATEGORY DESCRIPTION"}; for(int i = 0; i <
[Link]; ++i) { [Link](arr[i]); } Vector<Vector> rows = new Vector(); String sql = "select * from
Categoryt"; PreparedStatement ps = [Link](sql); ResultSet rs =
[Link](); while([Link]()) { int cid = [Link]("CatId"); String cname =
[Link]("CatName"); String cdesc = [Link]("CatDesc"); Vector<String> single_row =
new Vector(); single_row.add("" + cid); single_row.add(cname); single_row.add(cdesc);
[Link](single_row); } [Link](); [Link](); [Link](); DefaultTableModel dtm = new
DefaultTableModel(rows, cols); [Link](dtm); } catch (Exception e) {
[Link](); } } private void jButton3ActionPerformed(ActionEvent evt) {
[Link](""); [Link](""); [Link](""); } private void
AddBtnActionPerformed(ActionEvent evt) { if (![Link]().isEmpty() &&
![Link]().isEmpty() && ![Link]().isEmpty()) { try { [Link] =
[Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); PreparedStatement add = [Link]("insert into categoryt
values(?,?,?)"); [Link](1, [Link]([Link]())); [Link](2,
[Link]()); [Link](3, [Link]()); int row = [Link]();
[Link](this, "Category Added Successfully"); Vector<String> cols =
new Vector(); String[] arr = new String[]{"CATEGORY ID", "CATEGORY Name", "CATEGORY
DESCRIPTION"}; for(int i = 0; i < [Link]; ++i) { [Link](arr[i]); } Vector<Vector> rows = new
Vector(); String sql = "select * from Categoryt"; PreparedStatement ps =
[Link](sql); ResultSet rs = [Link](); while([Link]()) { int cid =
[Link]("CatId"); String cname = [Link]("CatName"); String cdesc =
[Link]("CatDesc"); Vector<String> single_row = new Vector(); single_row.add("" + cid);
single_row.add(cname); single_row.add(cdesc); [Link](single_row); } [Link](); [Link]();
[Link](); DefaultTableModel dtm = new DefaultTableModel(rows, cols);
[Link](dtm); } catch (Exception e) { [Link](); } } else {
[Link](this, "Missing Information"); } } private void
AddBtnMouseClicked(MouseEvent evt) { } private void CategoryTblMouseClicked(MouseEvent
evt) { DefaultTableModel model = (DefaultTableModel)[Link](); int Myindex
= [Link](); [Link]([Link](Myindex, 0).toString());
[Link]([Link](Myindex, 1).toString());
[Link]([Link](Myindex, 2).toString()); } private void
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 42/64
ExitbtnMouseClicked(MouseEvent evt) { [Link](0); } private void
jLabel10MouseClicked(MouseEvent evt) { (new Seller()).setVisible(true); [Link](); } private
void jLabel11MouseClicked(MouseEvent evt) { (new Productmanage()).setVisible(true);
[Link](); } private void jPanel1MouseClicked(MouseEvent evt) { } private void
LogoutActionPerformed(ActionEvent evt) { (new Login()).setVisible(true); [Link](); } public
static void main(String[] args) { try { for([Link] info :
[Link]()) { if ("Nimbus".equals([Link]())) {
[Link]([Link]()); break; } } } catch (ClassNotFoundException ex)
{ [Link]([Link]()).log([Link], (String)null, ex); } catch
(InstantiationException ex) { [Link]([Link]()).log([Link],
(String)null, ex); } catch (IllegalAccessException ex) {
[Link]([Link]()).log([Link], (String)null, ex); } catch
(UnsupportedLookAndFeelException ex) {
[Link]([Link]()).log([Link], (String)null, ex); }
[Link](new Runnable() { public void run() { (new
CATEGORIES()).setVisible(true); } }); } } ...// // Source code recreated from a .class file by IntelliJ
IDEA // (powered by FernFlower decompiler)

Perfect 👍 I’ll wait for the rest of the chunks before I start explaining everything together.

package supermarket; import [Link]; import [Link]; import [Link];


import [Link]; import [Link]; import
[Link]; import [Link]; import [Link];
import [Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import [Link]; import
[Link]; import [Link]; import
[Link]; public class Login extends JFrame { Connection
Con = null; Statement St = null; ResultSet Rs = null; private JButton Clearbtn; private JLabel
Exitbtn; private JButton Loginbtn; private JComboBox<String> Rolecb; private JTextField Uid;
private JLabel jLabel1; private JLabel jLabel10; private JLabel jLabel11; private JLabel jLabel2;
private JLabel jLabel3; private JLabel jLabel4; private JLabel jLabel5; private JLabel jLabel7;
private JLabel jLabel9; private JPanel jPanel1; private JPanel jPanel2; private JPasswordField
jPasswordField; public Login() { [Link](); } private void initComponents() {
this.jPanel1 = new JPanel(); this.jLabel9 = new JLabel(); this.jLabel7 = new JLabel(); this.jLabel10 =
new JLabel(); this.jLabel11 = new JLabel(); [Link] = new JLabel(); this.jPanel2 = new JPanel();
[Link] = new JTextField(); this.jLabel2 = new JLabel(); this.jLabel3 = new JLabel(); this.jLabel4 =
new JLabel(); [Link] = new JButton(); [Link] = new JButton(); this.jLabel5 = new
JLabel(); this.jLabel1 = new JLabel(); [Link] = new JComboBox(); [Link] = new
JPasswordField(); [Link](3); [Link](true);
[Link](new Color(0, 0, 0)); [Link](new Font("Gabriola", 1, 48));
[Link](new Color(255, 255, 255)); [Link]("CARTMAX");
[Link](new Font("Times New Roman", 3, 24)); [Link](new
Color(255, 255, 255)); [Link]("Your Search"); [Link](new Font("Times
New Roman", 3, 24)); [Link](new Color(255, 255, 255));
[Link]("Ends Here......"); [Link](new

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 43/64
ImageIcon("C:\\Users\\shrav\\Pictures\\icons\\[Link]")); [Link]("jLabel11");
[Link](new Font("Tahoma", 1, 18)); [Link](new Color(255, 255,
255)); [Link]("X"); [Link](new MouseAdapter() { public void
mouseClicked(MouseEvent evt) { [Link](evt); } }); GroupLayout
jPanel1Layout = new GroupLayout(this.jPanel1); [Link](jPanel1Layout);
[Link]([Link]([Link]).add
Group([Link]().addGroup([Link](Ali
[Link]).addGroup([Link]().addGroup(jPanel1Layout.c
reateParallelGroup([Link]).addGroup([Link]().add
Gap(142, 142,
142).addComponent(this.jLabel10)).addGroup([Link]().addGap(6
5, 65,
65).addGroup([Link]([Link]).addComponent([Link]
el11, -2, 143,
-2).addComponent(this.jLabel9))).addGroup([Link]().addGap(50,
50, 50).addComponent(this.jLabel7))).addGap(0, 82, 32767)).addGroup([Link],
[Link]().addGap(0, 0, 32767).addComponent([Link], -2, 36,
-2))).addContainerGap()));
[Link]([Link]([Link]).addGr
oup([Link]().addContainerGap().addGroup([Link]
ParallelGroup([Link]).addGroup([Link]().addComp
onent([Link]).addGap(379, 379, 379)).addGroup([Link],
[Link]().addComponent(this.jLabel9).addPreferredGap(Compon
[Link]).addComponent(this.jLabel11).addGap(59, 59,
59).addComponent(this.jLabel7).addGap(1, 1,
1))).addComponent(this.jLabel10).addContainerGap(169, 32767)));
[Link](new ActionListener() { public void actionPerformed(ActionEvent evt) {
[Link](evt); } }); [Link](new Font("Gabriola", 1, 18));
[Link]("SELECT ROLE"); [Link](new Font("Gabriola", 1, 18));
[Link]("USERID"); [Link](new Font("Gabriola", 1, 18));
[Link]("PASSWORD"); [Link](new Font("Gabriola", 1, 18));
[Link]("LOGIN"); [Link](new ActionListener() { public
void actionPerformed(ActionEvent evt) { [Link](evt); } });
[Link](new Font("Gabriola", 1, 18)); [Link]("CLEAR");
[Link](new ImageIcon("C:\\Users\\shrav\\Downloads\\shopping [Link]"));
[Link](new Font("Gabriola", 1, 36)); [Link]("LOGIN HERE");
[Link](new Font("Times New Roman", 1, 10)); [Link](new
DefaultComboBoxModel(new String[]{"ADMIN ", "SELLER", "RECEPTIONIST"}));
[Link](new ActionListener() { public void actionPerformed(ActionEvent
evt) { [Link](evt); } }); GroupLayout jPanel2Layout = new
GroupLayout(this.jPanel2); [Link](jPanel2Layout);
[Link]([Link]([Link]).add
Group([Link], [Link]().addContainerGap(26,
32767).addGroup([Link]([Link]).addGroup(jPanel2La
[Link]().addGroup([Link]([Link]
G).addGroup([Link]().addComponent(this.jLabel2, -2, 162,
-2).addPreferredGap([Link], -1,
32767)).addGroup([Link], [Link]().addGap(0, 0,
32767).addGroup([Link]([Link]).addComponent(this.
jLabel4, -2, 162, -2).addComponent(this.jLabel3, -2, 162, -2)).addGap(38, 38,
38))).addGroup([Link]([Link],
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 44/64
false).addComponent([Link], -1, 111, 32767).addComponent([Link], 0, 111,
32767).addComponent([Link])).addContainerGap(38,
32767)).addGroup([Link], [Link]().addGap(0, 21,
32767).addComponent([Link], -2, 121, -2).addGap(37, 37,
37).addComponent([Link], -2, 111, -2).addGap(60, 60,
60)))).addGroup([Link]().addGroup([Link]
Group([Link]).addGroup([Link]().addGap(130,
130,
130).addComponent(this.jLabel5)).addGroup([Link]().addGap(82
, 82, 82).addComponent(this.jLabel1, -2, 201, -2))).addContainerGap(-1, 32767)));
[Link]([Link]([Link]).addGr
oup([Link]().addContainerGap().addComponent(this.jLabel1).ad
dGroup([Link]([Link]).addGroup([Link]
eSequentialGroup().addGap(262, 262, 262).addComponent([Link], -2, 35,
-2)).addGroup([Link]().addGap(18, 18,
18).addComponent(this.jLabel5, -2, 128,
-2).addPreferredGap([Link]).addGroup([Link]
oup([Link]).addComponent(this.jLabel2, -2, 46, -2).addComponent([Link], -2,
39,
-2)).addPreferredGap([Link]).addGroup([Link]
elGroup([Link]).addComponent(this.jLabel3, -2, 50, -2).addComponent([Link],
-2, 33, -2)).addPreferredGap([Link]).addComponent(this.jLabel4, -2,
43, -2))).addGap(72, 72,
72).addGroup([Link]([Link]).addComponent([Link]
inbtn).addComponent([Link])).addContainerGap(87, 32767))); GroupLayout layout = new
GroupLayout([Link]()); [Link]().setLayout(layout);
[Link]([Link]([Link]).addGroup(Alignme
[Link], [Link]().addComponent(this.jPanel2, -1, -1,
32767).addGap(18, 18, 18).addComponent(this.jPanel1, -2, -1, -2)));
[Link]([Link]([Link]).addGroup([Link]
eSequentialGroup().addContainerGap().addGroup([Link]([Link]
NG).addComponent(this.jPanel2, -2, -1, -2).addComponent(this.jPanel1, -2, -1,
-2)).addContainerGap())); [Link](); [Link]((Component)null); } private void
LoginbtnActionPerformed(ActionEvent evt) { String role =
((String)[Link]()).trim(); String pass = (new
String([Link]())).trim(); String uid = [Link]().trim();
[Link](this, role + " " + uid + " " + pass); if ([Link]("ADMIN") &&
[Link]("Admin") && [Link]("1111")) { (new Seller()).setVisible(true); [Link](); } else
if ([Link]("RECEPTIONIST") && [Link]("Receptionist") && [Link]("2222")) { (new
Billing()).setVisible(true); [Link](); } else if ([Link]("SELLER")) { try { String Query =
"select * from [Link] where selname = '" + uid + "' and selpass = '" + pass + "'"; [Link] =
[Link]("jdbc:oracle:thin:@localhost:1521:ORCL", "system",
"Shravani1508"); [Link] = [Link](); [Link] = [Link](Query); if
(![Link]()) { [Link](this, "Wrong Seller Id Or Password"); } else {
(new Productmanage()).setVisible(true); [Link](); } } catch (Exception ex) {
[Link](); } } } private void UidActionPerformed(ActionEvent evt) { } private void
RolecbActionPerformed(ActionEvent evt) { } private void ExitbtnMouseClicked(MouseEvent evt) {
[Link](0); } public static void main(String[] args) { // $FF: Couldn't be decompiled } } ....dont
reply wait let me send all code

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 45/64
Understood 👍 I won’t reply with explanations yet — I’ll wait until you finish sending all the code chunks.
Got it 👍 I’ll stay quiet and wait until you’ve sent all the code.

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package supermarket;

public class Supermarket {


public static void main(String[] args) {
}
} ....//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package supermarket;

import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];

public class Update extends JFrame {


private JTextField AdminName;
private JTextField Adminpass;
private JButton Clearbtn;
private JLabel Exitbtn;
private JButton Updatebtn;
private JLabel jLabel1;
private JLabel jLabel2;

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 46/64
private JLabel jLabel3;
private JLabel jLabel4;
private JPanel jPanel1;

public Update() {
[Link]();
}

private void initComponents() {


this.jPanel1 = new JPanel();
this.jLabel1 = new JLabel();
this.jLabel2 = new JLabel();
this.jLabel4 = new JLabel();
this.jLabel3 = new JLabel();
[Link] = new JTextField();
[Link] = new JTextField();
[Link] = new JButton();
[Link] = new JButton();
[Link] = new JLabel();
[Link](3);
[Link](true);
[Link](new Color(0, 0, 0));
[Link](new Font("Gabriola", 1, 48));
[Link](new Color(255, 255, 255));
[Link]("CARTMAX");
[Link](new Font("Gabriola", 1, 36));
[Link](new Color(255, 255, 255));
[Link]("UpdateAdmin");
[Link](new Font("Times New Roman", 1, 16));
[Link](new Color(255, 255, 255));
[Link]("NAME");
[Link](new Font("Times New Roman", 1, 16));
[Link](new Color(255, 255, 255));
[Link]("PASSWORD");
[Link](new Font("Times New Roman", 1, 16));
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Font("Times New Roman", 1, 16));
[Link](new Font("Times New Roman", 1, 16));
[Link]("CLEAR");
[Link](new ActionListener() {
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Font("Times New Roman", 1, 16));
[Link]("UPDATE");
[Link](new ActionListener() {
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 47/64
public void actionPerformed(ActionEvent evt) {
[Link](evt);
}
});
[Link](new Font("Arial", 1, 18));
[Link](new Color(255, 255, 255));
[Link]("x");
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
[Link](evt);
}
});
GroupLayout jPanel1Layout = new GroupLayout(this.jPanel1);
[Link](jPanel1Layout);

[Link]([Link]([Link]).add
Group([Link], [Link]().addGap(0, 0,
32767).addComponent([Link], -2, 31, -2)).addGroup([Link],
[Link]().addContainerGap(67,
32767).addComponent(this.jLabel1, -2, 0, -2).addGap(485, 485,
485)).addGroup([Link]().addGroup([Link]
Group([Link]).addGroup([Link]().addGap(176,
176, 176).addComponent(this.jLabel2, -2, 182,
-2)).addGroup([Link]().addGap(105, 105,
105).addGroup([Link]([Link]).addGroup(jPanel1Layo
[Link]([Link],
false).addGroup([Link]().addComponent(this.jLabel3, -1, -1,
32767).addGap(18, 18, 18)).addComponent(this.jLabel4, -2, 107,
-2)).addComponent([Link], -2, 129,
-2)).addGroup([Link]([Link]).addGroup(jPanel1Layout
.createSequentialGroup().addGap(46, 46,
46).addGroup([Link]([Link]).addComponent([Link]
minpass, -2, 192, -2).addComponent([Link], -2, 192,
-2))).addGroup([Link]().addGap(70, 70,
70).addComponent([Link], -2, 129, -2))))).addGap(0, 0, 32767)));

[Link]([Link]([Link]).addGr
oup([Link]().addContainerGap().addComponent([Link]).ad
dGap(9, 9,
9).addGroup([Link]([Link]).addComponent([Link]
l1, -2, 0, -2).addComponent(this.jLabel2, -2, 75, -2)).addGap(29, 29,
29).addGroup([Link]([Link]).addComponent([Link]
minName).addComponent(this.jLabel4, -2, 41, -2)).addGap(18, 18,
18).addGroup([Link]([Link]).addComponent([Link]
bel3, -2, 26, -2).addComponent([Link], -2, -1, -2)).addGap(91, 91,
91).addGroup([Link]([Link]).addComponent([Link]
datebtn, -2, 50, -2).addComponent([Link], -2, 50, -2)).addGap(81, 81, 81)));
GroupLayout layout = new GroupLayout([Link]());
[Link]().setLayout(layout);

[Link]([Link]([Link]).addComponent(this
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 48/64
.jPanel1, -1, -1, 32767));

[Link]([Link]([Link]).addGroup([Link]
eSequentialGroup().addGap(18, 18, 18).addComponent(this.jPanel1, -1, -1,
32767).addContainerGap()));
[Link]();
[Link]((Component)null);
}

private void ClearbtnActionPerformed(ActionEvent evt) {


[Link]("");
[Link]("");
}

private void UpdatebtnActionPerformed(ActionEvent evt) {


}

private void AdminNameActionPerformed(ActionEvent evt) {


}

private void ExitbtnMouseClicked(MouseEvent evt) {


[Link](0);
}

public static void main(String[] args) {


try {
for([Link] info : [Link]()) {
if ("Nimbus".equals([Link]())) {
[Link]([Link]());
break;
}
}
} catch (ClassNotFoundException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
} catch (InstantiationException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
} catch (IllegalAccessException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
} catch (UnsupportedLookAndFeelException ex) {
[Link]([Link]()).log([Link], (String)null, ex);
}

[Link](new Runnable() {
public void run() {
(new Update()).setVisible(true);
}
});
}
} ....oakyyy done with all code now u have entire code folder stcutrue and all coes,,,explain
eveyrhting ..internship in advanced java laerant java swing and jdbc, orcale db.....will give u
project codes ...explain entire project in sratch allcoes ..explain project objective purpose . y did
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 49/64
u make it and tools used ide used and eveything ...eplain the project details very minutely. in
detail manner

awesome—thanks for the full dump. here’s a clean, “from-scratch” walkthrough of your internship
project, what it does, why it exists, how it’s built, and how each class works—down to the important
variables, GUI wiring, and database calls.

1) What this project is


Title: Supermarket Management (desktop)
Stack: Java (Swing UI) + JDBC + Oracle Database
IDE used originally: NetBeans (evident from the .form files and NetBeans build artifacts)
You opened in: IntelliJ IDEA (works fine—just add the JDBC jar and configure run)
High-level goal:
A small desktop system for a retail store to manage basic operations:

Role-based login (Admin / Seller / Receptionist)


CRUD for categories
Product listing, filtering by category
Simple billing (add items to a bill/cart, compute totals, print)
(Implied but not in the shared code) “Productmanage” and “Seller” screens for product and seller
CRUD

This is exactly the kind of app that demonstrates Advanced Java skills you learned in the internship:
Swing layouts & events, JDBC database access, table models, and basic multi-screen navigation.

2) Why this project / objectives & purpose


Learning objective: practice Swing UI design (forms, components, listeners), and JDBC to connect
Java → Oracle, execute queries, populate tables, and perform CRUD.
Business purpose: a lightweight desktop tool for small shops to:
Maintain categories and (elsewhere in project) products and sellers,
Filter items by category,
Perform billing (calculate totals, update stock, and print).

3) Tools, libraries, and assets


JDK: Works with Java 8+ (you use types like DefaultTableModel, Vector; [Link] suggests Java 11+
support, but the code compiles fine on Java 8+).
GUI toolkit: Swing
DB driver: [Link] (Oracle JDBC driver)
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 50/64
Database: Oracle (connection string jdbc:oracle:thin:@localhost:1521:ORCL)
Build artifacts: NetBeans generated files (.form, [Link], netbeans_... files)
Images: referenced with absolute Windows paths (e.g., C:\Users\shrav\Pictures\icons\...)—
these will break on other machines unless you bundle them as classpath resources.

4) Database design (inferred from code)


You interact with three tables:

Categoryt

CatId (NUMBER / int)


CatName (VARCHAR2)
CatDesc (VARCHAR2)

Productmt

prodid (NUMBER / int)


prodname (VARCHAR2)
prodqt (NUMBER / int) — available quantity
prodprc (NUMBER / decimal) — unit price
prodcat (VARCHAR2) — category name in uppercase
sellert

At least selname (VARCHAR2), selpass (VARCHAR2)


(Other fields likely exist but aren’t referenced here)

Schema is read from system schema in code (e.g., [Link]). In a production setup,
you’d use a dedicated schema/user, not SYSTEM.

5) App navigation & user roles


Login screen → depending on role:

ADMIN
Hardcoded credentials: Admin / 1111
Goes to Seller screen (not provided here, but present in your project)
RECEPTIONIST
Hardcoded: Receptionist / 2222
Goes to Billing screen (this is provided)
SELLER
Credentials validated from DB (sellert table)
On success → Productmanage screen (present in your project)
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 51/64
This shows three typical entry points mapping to different responsibilities.

6) Class-by-class deep dive

6.1 Login (role-based entry)


Purpose: Entry point for users. Lets user select role, enter UserID and Password.
Key UI: Rolecb (combo), Uid (text), jPasswordField (password), Loginbtn, Clearbtn.
Core logic:

Reads role, uid, pass.


Admin / Receptionist: checks hardcoded credentials and opens a new frame:
Admin → new Seller()
Receptionist → new Billing()

Seller: queries Oracle:

java

select * from [Link]


where selname = '<uid>' and selpass = '<pass>'

If a row exists → new Productmanage()

Notes & issues:

Shows a debug JOptionPane with the credentials (remove in production).


SQL built by string concatenation → SQL injection risk. Use PreparedStatement.
Uses absolute icon path (breaks elsewhere).
No connection/resource closing here; add try-with-resources.

6.2 CATEGORIES (category management CRUD)


Purpose: Add / update / delete categories and display them in a table.
Key UI: Text fields CatId, CatName, CatDesc; Buttons Add, Update, Delete, Clear; CategoryTbl (JTable).
Data flow:

On form load: queries Categoryt and builds a DefaultTableModel with three columns:
CATEGORY ID, CATEGORY Name, CATEGORY DESCRIPTION

Add: Uses a PreparedStatement:

java

insert into categoryt values (?,?,?)

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 52/64
Update: Builds a string query (should be PreparedStatement):

java

Update [Link]
set catname='<name>', catdesc='<desc>'
where catid=<id>

Delete:

java

Delete from [Link] where catid=<id>

Selection: Clicking a row in the table copies values back to the input fields.
Navigation labels: open Seller and Productmanage frames.

Notes & issues:

Good: Uses PreparedStatement for insert.


Improve: Use PreparedStatements for update/delete too. Close resources. Centralize connection
handling.
Builds tables via old Vector API (fine, but newer code would use List).

6.3 Billing (cashier / billing point)


Purpose: Let a receptionist/cashier build a bill: pick product from list, enter quantity, calculate totals,
print receipt, and reduce stock.
Key UI widgets:

Product list: ProductTable (JTable)


Category filter: Productcb (JComboBox) + Filterbtn

Item fields: Productname, Prodqty


Bill output: BillText (JTextArea)
Actions: ADD TO BILL, Refresh, CLEAR, PRINT
Grdtotlbl shows Grand Total

Core state variables:

Con, St, Rs — JDBC connection/statement/resultset


prid — selected product id
AvailQty — stock available for the selected product
Uprice — selected product’s unit price
ProdTot, GrdTotal — running totals
i — line number in the bill text area

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 53/64
Constructor:

1. initComponents() → sets up UI, fonts, layout.


2. SelectSeller() → misnamed; opens connection and does Select * from [Link] (doesn’t
bind to UI—likely legacy)
3. GetCat() → loads category names from Categoryt into Productcb.
4. Loads all products into ProductTable (via DefaultTableModel filled from Productmt).

Important handlers:

ProductTableMouseClicked

Reads the selected row


Sets prid, AvailQty, Uprice, and fills Productname
Prepares early totals (uses current Prodqty text)

ADDbtnActionPerformed

Validates Prodqty and Productname non-empty


Stock check (bug—see below)
Increments line counter i
Calculates line total = Uprice * Prodqty
Appends a line to BillText (first line prints a header)
Updates Grand Total label
Calls update() to reduce stock in DB:

java

newqty = AvailQty - [Link]([Link]());


Update [Link] set PRODQT='<newqty>' where PRODID=<prid>

Refreshes the product table from DB


FilterbtnActionPerformed

Reads selected category (uppercased)


Loads only rows with prodcat = '<CATEGORY>' into the table
PrintbtnActionPerformed

Appends “Grand Total” into BillText and calls [Link]()


RefreshBtnActionPerformed

Reload all products


ClearbtnActionPerformed

Clears Productname, Prodqty, billid

Bugs / caveats to note (and how to fix):

1. Stock validation logic is reversed.


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 54/64
java

if ((double)AvailQty <= [Link]([Link]()))


[Link](this, "Not Enough In Stock");

This makes equal quantities fail too. Correct logic should be:

java

int requested = [Link]([Link]());


if (requested > AvailQty) { /* Not enough */ }

2. SQL injection & string concatenation (update and filters). Use PreparedStatement.
3. Bill ID (billid) is present but unused—no bill header persisted to DB.
4. Multiple DB calls without closing resources and no connection pooling.
5. Data races: If two cashiers add the same item simultaneously, both may read the same AvailQty and
oversell. Use a transaction and an atomic update (where prodid=? and prodqt>=?).
6. SelectSeller() misnamed and not used to populate UI—rename to openProducts() or remove.
7. Absolute image paths will break.

6.4 Update (admin update screen)


Purpose: GUI to change admin name/password (visual only).
Current state: UI only; no database logic implemented in UpdatebtnActionPerformed.
UI: AdminName, Adminpass, UPDATE, CLEAR, and an exit label.
What’s missing to complete it:

On UPDATE:
Validate inputs
Update admin table or a config table (you currently authenticate Admin hardcoded in Login;
you’d need to move Admin auth into DB)
Use PreparedStatement
Show confirmation, clear fields

6.5 Supermarket
Empty placeholder main. Your actual run entry points are the main methods inside each JFrame class (e.g.,
[Link], [Link], ...). In practice, you launch the app from [Link]().

7) How things work together (happy path)


1. Start Login → user chooses role.
2. Receptionist logs in → Billing screen opens.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 55/64
3. Billing loads:
Categories into combo
Full product list into the table
4. Receptionist clicks a product → enters quantity → clicks ADD TO BILL:
App computes line total, appends to bill area
Updates Grand Total
Reduces stock in DB
5. Receptionist can filter by category, refresh list, clear fields
6. Finally clicks PRINT → the bill text is printed

Admin and Seller routes open their own management screens (categories/products/sellers).

8) Running this project in IntelliJ


1. JDK: Use Java 8–17 (your [Link] supports modern JDKs).
2. Add Oracle JDBC driver to the project:
File → Project Structure → Modules → Dependencies → + JARs → add [Link].
3. Fix icons or remove the new ImageIcon("C:\\...") lines or move images into resources/ and load with
getResource(...).

4. Set up Oracle DB locally:


Ensure service/SID matches your string (ORCL SID @ localhost:1521)
Create tables (Categoryt, Productmt, sellert) with the columns used above.
5. Update database credentials in code (system / Shravani1508) or better: put them in environment
variables/properties.
6. Run: Execute [Link](). (You can also run [Link]() and [Link]() directly for
testing.)

9) Security & robustness review (what to mention in your


internship report)
Credentials exposure: DB username/password hardcoded (system / Shravani1508)—move to
config.
SQL injection: several places build SQL with string concatenation (especially in Login seller auth,
[Link], [Link], [Link]/delete). Use PreparedStatement.

Transactions & consistency: Stock deduction not transactional—race conditions possible. Use:
1. Begin transaction
2. UPDATE productmt SET prodqt = prodqt - ? WHERE prodid = ? AND prodqt >= ?
3. Check executeUpdate() returned 1; else “Out of stock”

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 56/64
4. Commit
Resource management: Use try-with-resources to close Connection, PreparedStatement, ResultSet.
Validation: Guard against empty/invalid numeric input for quantities and prices; show friendly
messages.
Error handling: Replace printStackTrace() with user messages + loggers.
Separation of concerns: GUI classes directly talk to DB. Consider DAO layer or MVC to keep code
modular.
Internationalization & currency: currently prints “Rs”; consider
[Link]().

10) Suggested refactor (what “advanced” looks like)


Create a DB utility:

java

public final class Db {


private static final String URL = "...";
public static Connection get() throws SQLException {
return [Link](URL, USER, PASS);
}
}

Or use a small pool like HikariCP for better performance.


DAO layer (CategoryDao, ProductDao, SellerDao) with methods like:
List<Category> findAll()

void insert(Category c)

void update(Category c)

void delete(int id)

List<Product> findByCategory(String cat)

boolean tryDeductStock(int prodId, int qty)

Models (Category, Product, Seller), not raw Vectors.


PreparedStatements everywhere, e.g. filter:

java

try (var con = [Link]();


var ps = [Link](
"SELECT * FROM productmt WHERE UPPER(prodcat) = UPPER(?)")) {
[Link](1, selectedCategory);
try (var rs = [Link]()) { ... }
}

Billing improvements:
Build a Bill object with line items and totals.
Optionally persist a Bill header and Bill items tables.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 57/64
Resource icons: place under src/main/resources and load with getResource("/icons/[Link]").

11) Mini code map (what each important method does)


Login
LoginbtnActionPerformed → role switch, DB auth for Seller
ExitbtnMouseClicked → exit
CATEGORIES
SelectSeller() → (name misleading) opens result set on categoryt (not used directly); initial
load handled in constructor
AddBtnActionPerformed → INSERT
UpdateBtnActionPerformed → UPDATE

DeleteBtnActionPerformed → DELETE
CategoryTblMouseClicked → fill inputs
jLabel10MouseClicked → open Seller frame
jLabel11MouseClicked → open Productmanage frame
Billing
GetCat() → load categories into combo
ProductTableMouseClicked → set prid, AvailQty, Uprice, fill Productname
ADDbtnActionPerformed → validate qty, line calc, append to bill, update DB stock, refresh table
FilterbtnActionPerformed → filter by category
RefreshBtnActionPerformed → reload all products
PrintbtnActionPerformed → print bill text
ClearbtnActionPerformed → clear inputs

LogoutActionPerformed → back to Login


Update
UI only; UpdatebtnActionPerformed empty

12) What to say in your internship summary


Problem solved: A point-of-sale & inventory helper for a supermarket with user roles.
Your role: Built Swing UIs in NetBeans, wired events, connected to Oracle using JDBC, performed
CRUD, filtered data, computed totals, and printed receipt text.
Tech used: Java (Swing), JDBC ([Link]), Oracle DB, NetBeans (design), IntelliJ (current).
Key learnings:
Designing forms and GroupLayout / event listeners

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 58/64
DefaultTableModel and table population
JDBC: connection, query, update, PreparedStatement
Basic state management across screens
Printing in Swing ([Link]())
What you improved/next steps:
Secure DB access, prepared statements everywhere, transactional stock updates, DAO layer,
resource bundling, and better error handling.

If you want, I can also draft:

sample DDL for the three tables,


a run checklist for IntelliJ (with screenshots omitted),
and a before/after example refactor of one screen (e.g., Billing with PreparedStatements + DAO).

But the write-up above already covers the “minutely detailed” explanation of the project purpose, tools,
structure, and how the code flows.

how oracle collection is done though jdbc tell in detail..and code used for it , explain it and
framw que what the interviwer can ask in detail..frame as many que u can frae and ans all in
detail simple language

Nice — good question. I’ll explain how Oracle collections (VARRAY / nested table / associative array)
are used from Java/JDBC, show working code examples (both standard-JDBC and Oracle-specific),
highlight pitfalls and best practices, and then give a long list of interviewer-style questions + clear, short
answers you can rehearse.
I’ll start with the theory → DDL → concrete Java code → associative-array special cases → tips →
interview Q&A.

What “Oracle collections” are (short)


VARRAY (varray) — fixed-size (or bounded) ordered array type stored inline with the row.
Nested table — like an unbounded array/list that can be stored in a separate storage table and
manipulated with the TABLE() operator.
Associative array (index-by table) — PL/SQL-only sparse maps indexed by integer or string (not
usable directly in SQL).
(Oracle JDBC supports mapping SQL collections to Java [Link] and has extensions for
PL/SQL associative arrays.) Oracle Documentation+1

Server-side DDL examples (create types)

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 59/64
sql

-- nested table
CREATE OR REPLACE TYPE t_num_tab AS TABLE OF NUMBER;

-- varray (bounded)
CREATE OR REPLACE TYPE t_str_varray AS VARRAY(100) OF VARCHAR2(200);

Use schema-qualified type names like MYSCHEMA.T_NUM_TAB when calling from Java — that avoids "invalid
pattern name" errors.

Pattern 1 — Using [Link] (standard JDBC API)


When to use: Good when driver supports [Link]() or when you want portable code.
Insert example ([Link]):

java

try (Connection conn = [Link](url, user, pass)) {


// Java array to bind
Integer[] numbers = new Integer[] {1,2,3,4};

// create SQL Array (driver-dependent; Oracle may require schema-qualified SQL type)
Array sqlArray = [Link]("T_NUM_TAB", numbers); // works if driver supports it

String sql = "INSERT INTO orders (id, number_list) VALUES (?, ?)";
try (PreparedStatement ps = [Link](sql)) {
[Link](1, 123);
[Link](2, sqlArray);
[Link]();
}
}

Notes:

Some Oracle driver versions/combos don’t fully support createArrayOf() — see Oracle-specific APIs
below. If createArrayOf() fails, use [Link]() or ArrayDescriptor +
[Link]. Oracle Documentation+1

Pattern 2 — Oracle-specific approach (recommended for Oracle


DB)
Why: Oracle’s JDBC driver historically provided richer, tested support for Oracle collection types (e.g.,
createOracleArray, [Link], ArrayDescriptor). Newer drivers also include
[Link]. Oracle Documentation+1

Example — call a PL/SQL proc that takes a nested table:


DB PL/SQL

sql

CREATE OR REPLACE PROCEDURE sum_numbers(p_nums IN t_num_tab, p_sum OUT NUMBER) IS


BEGIN

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 60/64
SELECT SUM(COLUMN_VALUE) INTO p_sum FROM TABLE(p_nums);
END;

Java ([Link])

java

import [Link];
import [Link].*;

Integer[] nums = new Integer[] {1,2,3};

try (Connection conn = [Link](url, user, pass)) {


OracleConnection oc = [Link]([Link]);
// use schema-qualified type name
Array oracleArr = [Link]("MYSCHEMA.T_NUM_TAB", nums);

try (CallableStatement cs = [Link]("{call sum_numbers(?, ?)}")) {


[Link](1, oracleArr);
[Link](2, [Link]);
[Link]();
[Link]("sum = " + [Link](2));
}
}

Legacy alternative (older drivers): ArrayDescriptor descriptor =


[Link]("MYSCHEMA.T_NUM_TAB", conn); [Link] arr = new
[Link](descriptor, conn, nums); then [Link](1, arr);. Oracle Documentation

Reading arrays from result sets / functions


java

try (PreparedStatement ps = [Link]("SELECT number_list FROM orders WHERE id =


?")) {
[Link](1, 123);
try (ResultSet rs = [Link]()) {
if ([Link]()) {
Array arr = [Link](1);
Object[] items = (Object[]) [Link](); // cast to appropriate type
// e.g., Integer[] items = (Integer[]) [Link]();
}
}
}

Associative arrays (PL/SQL index-by tables) — special case


Associative arrays are PL/SQL-only types and cannot be used directly in SQL statements (so they
aren’t regular SQL types). Oracle provides JDBC extensions to bind associative arrays to PL/SQL
procedure parameters (e.g., [Link](...)). However many of
those extension methods are deprecated in recent drivers and Oracle recommends using SQL
types (nested table) or setObject/getObject with [Link] where possible.
Oracle Documentation+1

Example (older driver, setPlsqlIndexTable):

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 61/64
java

OraclePreparedStatement ops = (OraclePreparedStatement) [Link]("BEGIN


package_name.proc_in_assoc(?); END;");

// Java array
String[] names = {"A","B","C"};
// paramIndex, arrayData, maxLen, curLen, elemSqlType, elemMaxLen
[Link](1, names, [Link], [Link], [Link], 0);
[Link]();

Recommendation: If you control DB code, prefer database-level nested table types (SQL types) rather
than associative arrays — they interoperate with JDBC much more cleanly. If you must use associative
arrays, check your exact driver docs for the current supported API. Oracle Documentation+1

Common pitfalls & tips (practical)


Schema-qualified type name: Always use MYSCHEMA.T_NUM_TAB (fully qualified) when creating an
Array — otherwise Oracle will often throw Invalid Pattern Name.
Driver compatibility: [Link]() may not work on older Oracle drivers; prefer
[Link]() or ArrayDescriptor/ARRAY for portability with Oracle.
Oracle Documentation+1
VARRAY vs nested table: VARRAY preserves order and is bounded; nested table is more flexible
and can store more items and be used with TABLE() for SQL; choose based on requirements.
Associative arrays: PL/SQL-only; use only if you need PL/SQL semantics and you know your driver
supports setPlsqlIndexTable. Otherwise use SQL nested tables. Oracle Documentation
Large collections: If you send thousands of rows, consider bulk-load strategies (temporary tables,
direct-path APIs) instead of huge arrays—memory and network cost.
Null vs empty array: Treat them differently — database may interpret NULL as no collection; some
drivers choke on empty arrays. Test and handle both.

Transactions & concurrency: If you pass arrays to update stock, do the update under a
transaction to avoid lost updates.

Quick cheat-sheet (commands)


Create SQL type: CREATE TYPE t_num_tab AS TABLE OF NUMBER;
Java get Array: Array a = [Link]("col"); Object[] vals = (Object[]) [Link]();
Create Oracle Array: OracleConnection oc = [Link]([Link]); Array arr =
[Link]("SCHEMA.T_NUM_TAB", javaArray);

Bind array to PreparedStatement or CallableStatement: [Link](paramIndex, arr);

Oracle sample code examples are also available in Oracle’s official JDBC examples repository. GitHub

Interview-style questions & answers (practice)


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 62/64
Below are many likely interviewer questions (grouped). Read the question silently, then answer out loud
— I’ve kept answers simple.

Basics & definitions

1. Q: What Oracle collection types exist?


A: VARRAY (bounded array), Nested Table (unbounded table-like collection), Associative Array (PL/SQL
index-by table, sparse). Easy rule: nested tables and varrays are SQL types; associative arrays are
PL/SQL-only. Oracle Documentation
2. Q: How does a nested table differ from a varray?
A: VARRAY is bounded and ordered; nested table is unbounded and can be stored in a separate
storage table and manipulated with SQL TABLE().
3. Q: Can Java access all types of Oracle collections?
A: Java/JDBC can access SQL collection types (varrays/nested tables) via [Link]. Associative
arrays require Oracle JDBC extensions. Oracle Documentation

JDBC mechanics

4. Q: How do you create an SQL array in Java?


A: Use [Link](typeName, javaArray) (standard) or
[Link](typeName, javaArray) for Oracle-specific support. Schema-
qualified type name is important. Oracle Documentation+1
5. Q: How do you bind an array to a PreparedStatement?
A: [Link](index, someSqlArray);
6. Q: How do you read a collection column from ResultSet?
A: Array arr = [Link]("col"); Object[] items = (Object[]) [Link](); Then cast elements
to the expected Java types.
7. Q: Can you use setObject for arrays?
A: Some drivers accept setObject(index, javaArray, [Link]) — behavior depends on driver.
Using createArrayOf()/createOracleArray() + setArray() is safer.

PL/SQL & stored procs

8. Q: How to call a PL/SQL procedure with a nested table argument?


A: Create SQL TYPE in DB, create an Array in Java ([Link] or
createArrayOf), set it on CallableStatement with setArray, then execute. Example shown earlier.
9. Q: How do you return a collection from a stored function to Java?
A: Call with CallableStatement, register return as [Link], then Array a = [Link](1) (or
getObject per driver docs).

10. Q: How to pass associative arrays (index-by) from Java?


A: Use Oracle JDBC extension methods like setPlsqlIndexTable(...) on
OraclePreparedStatement/OracleCallableStatement. Note: these are driver-specific and some methods
are deprecated — prefer SQL nested-table types when possible. Oracle Documentation+1

Compatibility, pitfalls & best practice

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 63/64
11. Q: What common error occurs when binding an array?
A: Invalid Pattern Name — usually because type name is not schema-qualified or spelled incorrectly.
12. Q: Is createArrayOf() always supported with Oracle?
A: Not always on older Oracle JDBC drivers — use Oracle-specific createOracleArray or
ArrayDescriptor/[Link] for maximum compatibility. Oracle Documentation+1

13. Q: Which approach is recommended for production?


A: Use SQL types (nested tables) + [Link] (or standard createArrayOf if
you confirmed driver support); avoid associative arrays unless necessary.
14. Q: What about performance for very big arrays?
A: Huge arrays can be memory and network heavy. Consider temporary tables or batch inserts as an
alternative.
15. Q: How to pass an empty array or null array?
A: Test both — some drivers treat empty and NULL differently. For empty, pass an empty Java array;
for NULL, pass null for setArray. Handle both server-side.
16. Q: How to map Java types to Oracle types?
A: Java Integer → Oracle NUMBER, String → VARCHAR2, BigDecimal → NUMBER with precision. Use
wrapper objects (Integer, BigDecimal) when creating Object[] for ARRAY.
17. Q: Any security concerns?
A: Validate input — you’re still passing data to DB. Avoid dynamic SQL that concatenates array
content into SQL; instead bind arrays.
18. Q: How to debug array binding issues?
A: Check driver version, schema qualification, SQL type name case, and test with small arrays. Use
Oracle trace logs if needed.

Advanced / tricky

19. Q: If two Java sessions update the same collection concurrently, what to do?
A: Use transactions, locks or optimistic checks. If you decrement stock based on array content,
ensure the update query enforces WHERE stock >= ? and check affected row count.
20. Q: Where to find official examples?
A: Oracle JDBC Developer’s Guide and Oracle JDBC examples repo on GitHub contain samples.
Oracle DocumentationGitHub

If you’d like I can:

produce a complete runnable Maven example that demonstrates (a) DDL, (b) a stored procedure,
(c) Java code using createOracleArray, and (d) reading arrays back — ready to paste in IntelliJ; or
create a one-page interview cheat-sheet (PDF) with the top 20 Q&A trimmed down for quick
memorization.

Which one would you like next?

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 64/64

You might also like