Professional Documents
Culture Documents
SUBMITTED TO:
Mr. VIRENDRA SHARMA
SENIOR TEACHER
COMPUTER DEPARTMENT
SUBMITTED BY:-
Abhishek Sharma
CLASS XII-A
ROLL No. :-
Mr.VIRENDRA SHARMA
(COMPUTER DEPT).
BIRLA SCHOOL PILANI,
Signature of teacher:-
private void
FActionPerformed(java.awt.event.ActionEventevt) {
FEATURE COMPANY = new FEATURE();
COMPANY.setVisible(true);
this.setVisible(false);
// TODO add your handling code here:
}
FEATURES WINDOW:-
CODING:private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY FEATURE = new COMPANY();
FEATURE.setVisible(true);
this.setVisible(false);
// TODO add your handling code here:
}
private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY FEATURE = new COMPANY();
FEATURE.setVisible(true);
this.setVisible(false);
code here:
NOKIA WINDOW:-
CODING:importjava.sql.*;
importjavax.swing.JOptionPane;
importjavax.swing.table.DefaultTableModel;
private void
jButton3ActionPerformed(java.awt.event.ActionEventevt) {
intsrno=Integer.parseInt(tf1.getText());
if(srno==1)
tf2.setText("5000");
else if(srno==2)
tf2.setText("10000");
else if(srno==3)
tf2.setText("15000");
else if(srno==4)
tf2.setText("7000");
this.setVisible(false);
d1.setVisible(true); // TODO add your handling code here:
}
private void
jButton1ActionPerformed(java.awt.event.ActionEventevt) {
COMPANY NOKIA = new COMPANY();
NOKIA.setVisible(true);
this.setVisible(false);
here:
}
private void
jButton2ActionPerformed(java.awt.event.ActionEventevt) {
PREVIEW NOKIA= new PREVIEW();
NOKIA.setVisible(true);
this.setVisible(false);
here:
private void
jButton5ActionPerformed(java.awt.event.ActionEventevt) {
this.setVisible(true);
d1.dispose();
private void
formWindowActivated(java.awt.event.WindowEventevt) {
DefaultTableModel
model=(DefaultTableModel)nokia.getModel();
try{
Class.forName("java.sql.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/mo
bileshop","root","root");
Statement stmt=con.createStatement();
String query="SELECT * FROM nokia;";
ResultSetrs=stmt.executeQuery(query);
while(rs.next()){
String srno=rs.getString("srno");
String modelno=rs.getString("modelno");
String price=rs.getString("price");
model.addRow(new Object[] {srno,modelno,price});
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(null,"eroor in
connectivity");
}
private void
jButton4ActionPerformed(java.awt.event.ActionEventevt) {
String s=tf2.getText();
JOptionPane.showMessageDialog(null,"you are
charged"+s+"and your mobile will be delivered at your
home");
COMPANY NOKIA = new COMPANY();
NOKIA.setVisible(true);
this.setVisible(false);
d1.dispose();
SAMSUNG WINDOW:-
CODING:importjava.sql.*;
importjavax.swing.JOptionPane;
importjavax.swing.table.DefaultTableModel;
private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY SAMSUNG = new COMPANY();
SAMSUNG.setVisible(true);
this.setVisible(false);
code here:
private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt) {
PREVIEW SAMSUNG = new PREVIEW();
SAMSUNG.setVisible(true);
this.setVisible(false);
code here:
private void
jButton5ActionPerformed(java.awt.event.ActionEvente
vt) {
this.setVisible(true);
d1.dispose();
here:
private void
jButton3ActionPerformed(java.awt.event.ActionEvente
vt) {
intsrno=Integer.parseInt(tf1.getText());
if(srno==1)
tf2.setText("5000");
else if(srno==2)
tf2.setText("4000");
else if(srno==3)
tf2.setText("10000");
else if(srno==4)
tf2.setText("10000");
this.setVisible(false);
d1.setVisible(true);
// TODO add your handling code here:
}
private void
formWindowActivated(java.awt.event.WindowEventevt
){
DefaultTableModel
model=(DefaultTableModel)samsung.getModel();
try{
Class.forName("java.sql.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localh
ost/mobileshop","root","root");
Statement stmt=con.createStatement();
String query="SELECT * FROM samsung;";
ResultSetrs=stmt.executeQuery(query);
while(rs.next()){
String srno=rs.getString("srno");
String modelno=rs.getString("modelno");
String price=rs.getString("price");
model.addRow(new Object[] {srno,modelno,price});
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(null,"eroor in
connectivity");
}
private void
jButton4ActionPerformed(java.awt.event.ActionEvente
vt) {
String s=tf2.getText();
JOptionPane.showMessageDialog(null,"you are
charged"+s+"and your mobile will be delivered at your
home");
COMPANY SAMSUNG = new COMPANY();
SAMSUNG.setVisible(true);
this.setVisible(false);
APPLE WINDOW:-
CODING:importjava.sql.*;
importjavax.swing.JOptionPane;
importjavax.swing.table.DefaultTableModel;
private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt) {
PREVIEW APPLE= new PREVIEW();
APPLE.setVisible(true);
this.setVisible(false);
code here:
private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY APPLE = new COMPANY();
APPLE.setVisible(true);
this.setVisible(false);
code here:
private void
jButton5ActionPerformed(java.awt.event.ActionEvente
vt) {
this.setVisible(true);
d1.dispose();
private void
formWindowActivated(java.awt.event.WindowEventevt
){
DefaultTableModel
model=(DefaultTableModel)apple.getModel();
try{
Class.forName("java.sql.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localh
ost/mobileshop","root","root");
Statement stmt=con.createStatement();
String query="SELECT * FROM apple;";
ResultSetrs=stmt.executeQuery(query);
while(rs.next()){
String srno=rs.getString("srno");
String modelno=rs.getString("modelno");
String price=rs.getString("price");
model.addRow(new Object[] {srno,modelno,price});
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(null,"eroor in
connectivity");
}
private void
jButton3ActionPerformed(java.awt.event.ActionEvente
vt) {
intsrno=Integer.parseInt(tf1.getText());
if(srno==1)
tf2.setText("10000");
else if(srno==2)
tf2.setText("15000");
else if(srno==3)
tf2.setText("25000");
else if(srno==4)
tf2.setText("30000");
this.setVisible(false);
d1.setVisible(true);
code here:
private void
jButton4ActionPerformed(java.awt.event.ActionEvente
vt) {
String s=tf2.getText();
JOptionPane.showMessageDialog(null,"you are
charged"+s+"and your mobile will be delivered at your
home");
COMPANY APPLE = new COMPANY();
APPLE.setVisible(true);
this.setVisible(false);
PREVIEW WINDOW:-
CODING:importjavax.swing.JOptionPane;
private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt) {
private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY PREVIEW = new COMPANY();
PREVIEW.setVisible(true);
this.setVisible(false);
code here:
private void
jButton5ActionPerformed(java.awt.event.ActionEvente
vt) {
this.setVisible(true);
d1.dispose();
here:
}
private void
jButton4ActionPerformed(java.awt.event.ActionEvente
vt) {
String s=tf2.getText();
JOptionPane.showMessageDialog(null,"you are
charged"+s+"and your mobile will be delivered at your
home");
COMPANY SAMSUNG = new COMPANY();
SAMSUNG.setVisible(true);
this.setVisible(false);
d1.dispose();
here:
private void
jLabel6MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("10000");
// TODO add your handling code here:
}
private void
jLabel8MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("7000");
code here:
private void
jLabel3MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("30000");
code here:
private void
jLabel5MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("25000");
code here:
private void
jLabel2MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("5000");
code here:
private void
jLabel1MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("4000");
code here:
private void
jLabel4MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("15000");
code here:
private void
jLabel9MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
APPLE:Srn
o.
1
Model no.
price
Ipad
15000
iphone
20000
Itop
25000
Me
30000
Values(2,iphone,20000);
INSERT INTO APPLE
Values(3,itop,25000);
INSERT INTO APPLE
Values(4,me,30000);
NOKIA:Srno.
1
2
3
4
Model no.
C201
N95
E97
N70
price
5000
1000
15000
7000
SAMSUNG:Srno.
1
2
3
4
Model no.
guru
S45
S50
galaxy
price
5000
4000
10000
10000
BIBLIOGRAPHY
I.P. SUMITA ARORA (class XII)
MOVE FAST WITH I.P. (class XII)