SlideShare a Scribd company logo
1 of 24
Submitted By
Ramraj meena
BCA 2nd Year
Dezyne E’cole College
AWT LAYOUT IN JAVA
Submitted By
RAMRAJ MEENA
BCA – 2ND Year
Dezyne E’ Cole College
106/10, Civil Lines, Ajmer
Tel: 0145-2624679
www.dezyneecole.com
2015-2016
Acknowledgement
This awt layout “JAVA” was developed at Dezyne E’cole College.
During the making of this project I have learnt a lot and I thank my mentor
Mr. Mukesh Gujar for helping us during the making of project.
I thank my college “Dezyne E’cole College” for helping us to bring out our
skill.
Thank you,
Ramraj meena
BCA 2 nd Year
Window 1
Swaping
Window 1
Swaping
import java.awt.*;
import java.awt.event.*;
public class swap extends Frame implements ActionListener,WindowListener
{
Label lblh,lblfn,lblsn,lblr;
TextField txtfn,txtsn,txtr;
Button b1,b2;
public swap()
{
setTitle("Swaping");
setResizable(false);
setSize(300,250);
setBackground(Color.gray);
Font f=new Font("Lucido Cansole",Font.BOLD,14);
lblh=new
Label("Swaping");add(lblh);lblh.setBounds(110,30,100,30);
lblh.setFont(f);
lblfn=new Label("Enter First
No.");add(lblfn);lblfn.setBounds(10,70,130,30);
lblfn.setFont(f);
lblfn.setForeground(Color.white);
lblsn=new Label("Enter Second
No.");add(lblsn);lblsn.setBounds(10,110,130,30);
lblsn.setFont(f);
lblsn.setForeground(Color.white);
txtfn=new
TextField();add(txtfn);txtfn.setBounds(140,70,130,30);
txtfn.setFont(f);
txtsn=new
TextField();add(txtsn);txtsn.setBounds(140,110,130,30);
txtsn.setFont(f);
b1=new
Button("Show");add(b1);b1.setBounds(60,170,80,40);b1.setFont(f);
b2=new
Button("Clear");add(b2);b2.setBounds(190,170,80,40);b2.setFont(f);
Window 1
Swaping
b1.addActionListener(this);
b2.addActionListener(this);
addWindowListener(this);
setLayout(null);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
try
{
if(e.getSource()==b1)
{
int a,b;
a=Integer.parseInt(txtfn.getText());
b=Integer.parseInt(txtsn.getText());
txtsn.setText(String.valueOf(a));
txtfn.setText(String.valueOf(b));
}
else if(e.getSource()==b2)
{
txtfn.setText("");
txtsn.setText("");
}}
catch(Exception e1)
{}
}
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowClosed(WindowEvent e){}
public void windowClosing(WindowEvent e){System.exit(0);}
public void windowOpened(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public static void main(String args[])
{
swap sp=new swap();
}
}
Window 2
Personal Detail
Window 2
Personal Detail
import java.awt.*;
import java.awt.event.*;
public class personal extends Frame implements ActionListener,WindowListener
{
Label lblsr,lblnm,lblcity,lbladd;
TextField txtsr,txtnm,txtcity;
TextArea ta;
Button b1,b2;
public personal()
{
setTitle("Personal Details");
setSize(300,400);
setResizable(false);
lblsr=new Label("SR NO."); txtsr=new TextField();
lblsr.setForeground(Color.red);
lblnm=new Label("Name"); txtnm=new TextField();
lblnm.setForeground(Color.red);
lblcity=new Label("City"); txtcity=new TextField();
lblcity.setForeground(Color.red);
lbladd=new Label("Detail's");ta=new TextArea();
lbladd.setForeground(Color.red);
b1=new Button("Show");
b2=new Button("Clear");
add(lblsr);
lblsr.setBounds(10,50,40,30);
add(txtsr);
txtsr.setBackground(Color.black);
txtsr.setForeground(Color.white);
txtsr.setBounds(70,50,150,30);
add(lblnm);
lblnm.setBounds(10,90,50,30);
add(txtnm);
txtnm.setBackground(Color.black);
txtnm.setForeground(Color.white);
txtnm.setBounds(70,90,150,30);
add(lblcity);
lblcity.setBounds(10,130,50,30);
add(txtcity);
txtcity.setBackground(Color.black);
txtcity.setForeground(Color.white);
txtcity.setBounds(70,130,150,30);
Window 2
Personal Detail
add(lbladd);
lbladd.setBounds(10,170,50,30);
add(ta);
ta.setBounds(70,170,150,150);
ta.setEditable(false);
add(b1);
add(b2);
b2.setForeground(Color.red);
b1.setForeground(Color.red);
b1.setBounds(70,330,70,40);
b2.setBounds(150,330,70,40);
b1.addActionListener(this);
b2.addActionListener(this);
addWindowListener(this);
setLayout(null);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==b1)
{
b1.setLabel("Show");
String nm=txtnm.getText();
int l;
l=nm.length();
if(l>0 && l<11)
{
b1.setLabel(txtnm.getText());
}
else
{
txtnm.setText("Enter only
10 Character");
}
ta.append("SR
NO.="+txtsr.getText()+"nName="+txtnm.getText()+"nCity="+txtcity.getText());
}
else if(e.getSource()==b2)
{
txtsr.setText("");
txtnm.setText("");
}
Window 2
Personal Detail
add(lbladd);
lbladd.setBounds(10,170,50,30);
add(ta);
ta.setBounds(70,170,150,150);
ta.setEditable(false);
add(b1);
add(b2);
b2.setForeground(Color.red);
b1.setForeground(Color.red);
b1.setBounds(70,330,70,40);
b2.setBounds(150,330,70,40);
b1.addActionListener(this);
b2.addActionListener(this);
addWindowListener(this);
setLayout(null);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==b1)
{
b1.setLabel("Show");
String nm=txtnm.getText();
int l;
l=nm.length();
if(l>0 && l<11)
{
b1.setLabel(txtnm.getText());
}
else
{
txtnm.setText("Enter only
10 Character");
}
ta.append("SR
NO.="+txtsr.getText()+"nName="+txtnm.getText()+"nCity="+txtcity.getText());
}
else if(e.getSource()==b2)
{
txtsr.setText("");
txtnm.setText("");
}
Window 2
Number System
txtcity.setText("");
ta.setText("");
b1.setLabel("Show");
}
}
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowClosed(WindowEvent e){}
public void windowClosing(WindowEvent e){System.exit(0);}
public void windowOpened(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public static void main(String args[])
{
personal pr=new personal();
}
}
Window 2
String Concatenation
Window 2
String Concatenation
import java.awt.*;
import java.awt.event.*;
public class demo extends Frame implements ActionListener,WindowListener
{
Label lblh,lblfn,lblsn,lblr;
TextField txtfn,txtsn,txtr;
Button b1,b2;
demo()
{
setTitle("Win1");
setSize(300,300);
setResizable(false);
Font f=new Font("Arial",Font.BOLD,12);
Color c=new Color(59,59,59);
setBackground(c);
Font f1=new Font("Arial",Font.BOLD,16);
lblh=new Label("String
Concatenation");add(lblh);lblh.setBounds(60,40,170,30);
lblh.setFont(f1);
lblh.setForeground(Color.gray);
lblfn=new Label("Enter 1st
Name:");add(lblfn);lblfn.setBounds(10,80,110,30);
lblfn.setFont(f);
lblfn.setForeground(Color.white);
lblsn=new Label("Enter 2nd
Name:");add(lblsn);lblsn.setBounds(10,120,110,30);
lblsn.setFont(f);
lblsn.setForeground(Color.white);
lblr=new
Label("Result:");add(lblr);lblr.setBounds(10,160,110,30);
lblr.setFont(f);
lblr.setForeground(Color.white);
Color c1=new Color(184,184,114);
txtfn=new
TextField();add(txtfn);txtfn.setBounds(120,80,130,30);
txtfn.setFont(f);
Window 2
String Concatenation
txtfn.setBackground(c1);
txtsn=new
TextField();add(txtsn);txtsn.setBounds(120,120,130,30);
txtsn.setFont(f);
txtsn.setBackground(c1);
txtr=new
TextField();add(txtr);txtr.setBounds(120,160,130,30);
txtr.setFont(f);
txtr.setBackground(c1);
txtr.setEditable(false);
b1=new Button("Show");
add(b1);b1.setBounds(40,210,80,40);
b1.setFont(f);
b1.setBackground(c1);
b2=new
Button("Clear");add(b2);b2.setBounds(170,210,80,40);
b2.setFont(f);
b2.setBackground(c1);
b1.addActionListener(this);
b2.addActionListener(this);
addWindowListener(this);
setLayout(null);
setVisible(true);
} public void actionPerformed(ActionEvent e)
{
String s,s1,f;
if(e.getSource()==b1)
{
s=txtfn.getText();
s1=txtsn.getText();
f=s.concat(" "+s1);
txtr.setText(f);
}
else if(e.getSource()==b2)
{
Window 2
String Concatenation
txtfn.setText("");
txtsn.setText("");
txtr.setText("");
}
}
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowClosed(WindowEvent e){}
public void windowClosing(WindowEvent e){System.exit(0);}
public void windowOpened(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public static void main(String args[])
{
demo obj=new demo();
}
}
Window 3
Arithmetic calculation
Window 3
Arithmatic Calculation
mport java.awt.*;
import java.awt.event.*;
public class arithcalc extends Frame implements ActionListener,WindowListener
{
Label lblf,lbls,lblr;
TextField txtf,txts,txtr;
Button bp,bs,bd,bm,bmo,bc;
public arithcalc()
{
setTitle("Number");
setSize(500,500);
setResizable(false);
lblf=new Label("Enter First Number : ");
lbls=new Label("Enter Second Number : ");
lblr=new Label("Result : ");
txtf=new TextField();
txts=new TextField();
txtr=new TextField();
txtr.setEditable(false);
bp=new Button("+");
bs=new Button("-");
bm=new Button("*");
bd=new Button("/");
bmo=new Button("%");
bc=new Button("Clear");
setLayout(new GridLayout(4,14));
Panel p1=new Panel(new GridLayout(1,3));
Panel p2=new Panel(new GridLayout(1,3));
Window 3
Arithmatic Calculation
Panel p3=new Panel(new GridLayout(1,3));
Panel p4=new Panel(new GridLayout(1,5));
p1.add(lblf);p1.add(txtf);p1.add(new Label());
p2.add(lbls);p2.add(txts);p2.add(bc);
p3.add(lblr);p3.add(txtr);p3.add(new Label());
p4.add(bp);p4.add(bs);p4.add(bm);p4.add(bd);p4.add(bmo);
add(p1);
add(p2);
add(p3);
add(p4);
bp.addActionListener(this);
bs.addActionListener(this);
bm.addActionListener(this);
bd.addActionListener(this);
bmo.addActionListener(this);
bc.addActionListener(this);
addWindowListener(this);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
int a,b,c;
String s;
try{
if(e.getSource()==bp)
{
a=Integer.parseInt(txtf.getText());
b=Integer.parseInt(txts.getText());
c=a+b;
s=String.valueOf(c);
txtr.setText(s);
}
else if(e.getSource()==bs)
{
a=Integer.parseInt(txtf.getText());
b=Integer.parseInt(txts.getText());
Window 3
Arithmatic Calculation
c=a-b;
s=String.valueOf(c);
txtr.setText(s);
}
else if(e.getSource()==bm)
{
a=Integer.parseInt(txtf.getText());
b=Integer.parseInt(txts.getText());
c=a*b;
s=String.valueOf(c);
txtr.setText(s);
}
else if(e.getSource()==bd)
{
a=Integer.parseInt(txtf.getText());
b=Integer.parseInt(txts.getText());
c=a/b;
s=String.valueOf(c);
txtr.setText(s);
}
else if(e.getSource()==bmo)
{
a=Integer.parseInt(txtf.getText());
b=Integer.parseInt(txts.getText());
c=a%b;
s=String.valueOf(c);
txtr.setText(s);
}
else if(e.getSource()==bc)
{
txtf.setText("");
txts.setText("");
txtr.setText("");
}
}
catch(Exception e1)
{}
}
Window 3
Arithmatic Calculation
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowClosed(WindowEvent e){}
public void windowClosing(WindowEvent e){System.exit(0);}
public void windowOpened(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public static void main(String args[])
{
arithcalc nm=new arithcalc();
}
}
Window 4
Upper case lower case
Window 4
Upper case lower case
import java.awt.*;
import java.awt.event.*;
public class upper extends Frame implements ActionListener,WindowListener
{
Label lblh,lblnm,lblup,lbllo;
TextField txtnm,txtup,txtlo;
Button b1,b2;
public upper()
{
setTitle("Upper & Lower");
setSize(350,300);
setResizable(false);
setBackground(Color.black);
lblh=new Label("Upper &Lower
Case");add(lblh);lblh.setBounds(100,40,150,30);
Font f=new Font("Lucido Cansole",Font.BOLD,15);
lblh.setFont(f);
lblh.setForeground(Color.white);
lblnm=new Label("Enter
Name");add(lblnm);lblnm.setBounds(10,80,150,30);
Font fo=new Font("Lucido
Cansole",Font.BOLD,14);
lblnm.setFont(fo);
lblnm.setForeground(Color.white);
lblup=new Label("Change
UpperCase");add(lblup);lblup.setBounds(10,120,150,30);
lblup.setFont(fo);
lblup.setForeground(Color.white);
lbllo=new Label("Change
LowerCase");add(lbllo);lbllo.setBounds(10,160,150,30);
lbllo.setFont(fo);
lbllo.setForeground(Color.white);
txtnm=new TextField();add(txtnm);txtnm.setBounds(170,80,150,30);
txtnm.setFont(fo);
txtup=new
TextField();add(txtup);txtup.setBounds(170,120,150,30);
txtup.setFont(fo);
txtup.setEditable(false);
Window 4
Upper case lower case
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowClosed(WindowEvent e){}
public void windowClosing(WindowEvent e){System.exit(0);}
public void windowOpened(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public static void main(String args[])
{
upper u=new upper();
}
}
Window 4
Upper case lower case
txtlo=new TextField();add(txtlo);txtlo.setBounds(170,160,150,30);
txtlo.setFont(fo);
txtlo.setEditable(false);
b1=new
Button("Show");add(b1);b1.setBounds(80,200,90,40);
b1.setFont(fo);
b2=new
Button("Clear");add(b2);b2.setBounds(230,200,90,40);
b2.setFont(fo);
b1.addActionListener(this);
b2.addActionListener(this);
addWindowListener(this);
setLayout(null);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
String s,str,s1;
if(e.getSource()==b1)
{
s1=txtnm.getText();
s=s1.toUpperCase();
txtup.setText(s);
s=s1.toLowerCase();
txtlo.setText(s);
}
else if(e.getSource()==b2)
{
txtnm.setText("");
txtup.setText("");
txtlo.setText("");
}
}

More Related Content

Similar to Ramraj

Fee managment system
Fee managment systemFee managment system
Fee managment systemfairy9912
 
What is new in sulu 2.0
What is new in sulu 2.0What is new in sulu 2.0
What is new in sulu 2.0danrot
 
The Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S GuideThe Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S GuideStephen Chin
 
code for quiz in my sql
code for quiz  in my sql code for quiz  in my sql
code for quiz in my sql JOYITAKUNDU1
 
JavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good PartsJavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good PartsKonrad Malawski
 
Creating a Facebook Clone - Part XXV - Transcript.pdf
Creating a Facebook Clone - Part XXV - Transcript.pdfCreating a Facebook Clone - Part XXV - Transcript.pdf
Creating a Facebook Clone - Part XXV - Transcript.pdfShaiAlmog1
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with MobelloJeong-Geun Kim
 
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017 Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017 Codemotion
 
Academy PRO: React native - building first scenes
Academy PRO: React native - building first scenesAcademy PRO: React native - building first scenes
Academy PRO: React native - building first scenesBinary Studio
 
XML-Free Programming
XML-Free ProgrammingXML-Free Programming
XML-Free ProgrammingStephen Chin
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearDezyneecole
 
DSC - Android Study Jams - Session 2
DSC - Android Study Jams - Session 2 DSC - Android Study Jams - Session 2
DSC - Android Study Jams - Session 2 vaishnaviayyappan
 

Similar to Ramraj (20)

Jagriti
Jagriti Jagriti
Jagriti
 
Yash Agarwal
Yash AgarwalYash Agarwal
Yash Agarwal
 
Heena
Heena Heena
Heena
 
Practical
PracticalPractical
Practical
 
Fee managment system
Fee managment systemFee managment system
Fee managment system
 
What is new in sulu 2.0
What is new in sulu 2.0What is new in sulu 2.0
What is new in sulu 2.0
 
The Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S GuideThe Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S Guide
 
Kuldeep
KuldeepKuldeep
Kuldeep
 
code for quiz in my sql
code for quiz  in my sql code for quiz  in my sql
code for quiz in my sql
 
Bean Intro
Bean IntroBean Intro
Bean Intro
 
Java 8: the good parts!
Java 8: the good parts!Java 8: the good parts!
Java 8: the good parts!
 
JavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good PartsJavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good Parts
 
Creating a Facebook Clone - Part XXV - Transcript.pdf
Creating a Facebook Clone - Part XXV - Transcript.pdfCreating a Facebook Clone - Part XXV - Transcript.pdf
Creating a Facebook Clone - Part XXV - Transcript.pdf
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with Mobello
 
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017 Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017
 
Java and xml
Java and xmlJava and xml
Java and xml
 
Academy PRO: React native - building first scenes
Academy PRO: React native - building first scenesAcademy PRO: React native - building first scenes
Academy PRO: React native - building first scenes
 
XML-Free Programming
XML-Free ProgrammingXML-Free Programming
XML-Free Programming
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third Year
 
DSC - Android Study Jams - Session 2
DSC - Android Study Jams - Session 2 DSC - Android Study Jams - Session 2
DSC - Android Study Jams - Session 2
 

More from dezyneecole

Gracika Benjamin , Diploma Fashion Design Second Year
Gracika Benjamin , Diploma Fashion Design Second YearGracika Benjamin , Diploma Fashion Design Second Year
Gracika Benjamin , Diploma Fashion Design Second Yeardezyneecole
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second YearSheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second Yeardezyneecole
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Yeardezyneecole
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Yeardezyneecole
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Yeardezyneecole
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second YearSheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second Yeardezyneecole
 
Sushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second YearSushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second Yeardezyneecole
 
Sushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second YearSushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second Yeardezyneecole
 
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...dezyneecole
 
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...dezyneecole
 
Gitesh Chhatwani , BCA -3 Year
Gitesh Chhatwani , BCA -3 YearGitesh Chhatwani , BCA -3 Year
Gitesh Chhatwani , BCA -3 Yeardezyneecole
 
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)dezyneecole
 
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)dezyneecole
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...dezyneecole
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)dezyneecole
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)dezyneecole
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)dezyneecole
 
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...dezyneecole
 
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)dezyneecole
 
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)dezyneecole
 

More from dezyneecole (20)

Gracika Benjamin , Diploma Fashion Design Second Year
Gracika Benjamin , Diploma Fashion Design Second YearGracika Benjamin , Diploma Fashion Design Second Year
Gracika Benjamin , Diploma Fashion Design Second Year
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second YearSheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Year
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Year
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Year
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second YearSheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
 
Sushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second YearSushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second Year
 
Sushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second YearSushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second Year
 
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
 
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
 
Gitesh Chhatwani , BCA -3 Year
Gitesh Chhatwani , BCA -3 YearGitesh Chhatwani , BCA -3 Year
Gitesh Chhatwani , BCA -3 Year
 
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
 
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
 
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
 
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
 
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
 

Recently uploaded

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfKartik Tiwari
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 

Recently uploaded (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 

Ramraj

  • 1. Submitted By Ramraj meena BCA 2nd Year Dezyne E’cole College
  • 2. AWT LAYOUT IN JAVA Submitted By RAMRAJ MEENA BCA – 2ND Year Dezyne E’ Cole College 106/10, Civil Lines, Ajmer Tel: 0145-2624679 www.dezyneecole.com 2015-2016
  • 3. Acknowledgement This awt layout “JAVA” was developed at Dezyne E’cole College. During the making of this project I have learnt a lot and I thank my mentor Mr. Mukesh Gujar for helping us during the making of project. I thank my college “Dezyne E’cole College” for helping us to bring out our skill. Thank you, Ramraj meena BCA 2 nd Year
  • 5. Window 1 Swaping import java.awt.*; import java.awt.event.*; public class swap extends Frame implements ActionListener,WindowListener { Label lblh,lblfn,lblsn,lblr; TextField txtfn,txtsn,txtr; Button b1,b2; public swap() { setTitle("Swaping"); setResizable(false); setSize(300,250); setBackground(Color.gray); Font f=new Font("Lucido Cansole",Font.BOLD,14); lblh=new Label("Swaping");add(lblh);lblh.setBounds(110,30,100,30); lblh.setFont(f); lblfn=new Label("Enter First No.");add(lblfn);lblfn.setBounds(10,70,130,30); lblfn.setFont(f); lblfn.setForeground(Color.white); lblsn=new Label("Enter Second No.");add(lblsn);lblsn.setBounds(10,110,130,30); lblsn.setFont(f); lblsn.setForeground(Color.white); txtfn=new TextField();add(txtfn);txtfn.setBounds(140,70,130,30); txtfn.setFont(f); txtsn=new TextField();add(txtsn);txtsn.setBounds(140,110,130,30); txtsn.setFont(f); b1=new Button("Show");add(b1);b1.setBounds(60,170,80,40);b1.setFont(f); b2=new Button("Clear");add(b2);b2.setBounds(190,170,80,40);b2.setFont(f);
  • 6. Window 1 Swaping b1.addActionListener(this); b2.addActionListener(this); addWindowListener(this); setLayout(null); setVisible(true); } public void actionPerformed(ActionEvent e) { try { if(e.getSource()==b1) { int a,b; a=Integer.parseInt(txtfn.getText()); b=Integer.parseInt(txtsn.getText()); txtsn.setText(String.valueOf(a)); txtfn.setText(String.valueOf(b)); } else if(e.getSource()==b2) { txtfn.setText(""); txtsn.setText(""); }} catch(Exception e1) {} } public void windowActivated(WindowEvent e){} public void windowDeactivated(WindowEvent e){} public void windowClosed(WindowEvent e){} public void windowClosing(WindowEvent e){System.exit(0);} public void windowOpened(WindowEvent e){} public void windowIconified(WindowEvent e){} public void windowDeiconified(WindowEvent e){} public static void main(String args[]) { swap sp=new swap(); } }
  • 8. Window 2 Personal Detail import java.awt.*; import java.awt.event.*; public class personal extends Frame implements ActionListener,WindowListener { Label lblsr,lblnm,lblcity,lbladd; TextField txtsr,txtnm,txtcity; TextArea ta; Button b1,b2; public personal() { setTitle("Personal Details"); setSize(300,400); setResizable(false); lblsr=new Label("SR NO."); txtsr=new TextField(); lblsr.setForeground(Color.red); lblnm=new Label("Name"); txtnm=new TextField(); lblnm.setForeground(Color.red); lblcity=new Label("City"); txtcity=new TextField(); lblcity.setForeground(Color.red); lbladd=new Label("Detail's");ta=new TextArea(); lbladd.setForeground(Color.red); b1=new Button("Show"); b2=new Button("Clear"); add(lblsr); lblsr.setBounds(10,50,40,30); add(txtsr); txtsr.setBackground(Color.black); txtsr.setForeground(Color.white); txtsr.setBounds(70,50,150,30); add(lblnm); lblnm.setBounds(10,90,50,30); add(txtnm); txtnm.setBackground(Color.black); txtnm.setForeground(Color.white); txtnm.setBounds(70,90,150,30); add(lblcity); lblcity.setBounds(10,130,50,30); add(txtcity); txtcity.setBackground(Color.black); txtcity.setForeground(Color.white); txtcity.setBounds(70,130,150,30);
  • 9. Window 2 Personal Detail add(lbladd); lbladd.setBounds(10,170,50,30); add(ta); ta.setBounds(70,170,150,150); ta.setEditable(false); add(b1); add(b2); b2.setForeground(Color.red); b1.setForeground(Color.red); b1.setBounds(70,330,70,40); b2.setBounds(150,330,70,40); b1.addActionListener(this); b2.addActionListener(this); addWindowListener(this); setLayout(null); setVisible(true); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { b1.setLabel("Show"); String nm=txtnm.getText(); int l; l=nm.length(); if(l>0 && l<11) { b1.setLabel(txtnm.getText()); } else { txtnm.setText("Enter only 10 Character"); } ta.append("SR NO.="+txtsr.getText()+"nName="+txtnm.getText()+"nCity="+txtcity.getText()); } else if(e.getSource()==b2) { txtsr.setText(""); txtnm.setText(""); }
  • 10. Window 2 Personal Detail add(lbladd); lbladd.setBounds(10,170,50,30); add(ta); ta.setBounds(70,170,150,150); ta.setEditable(false); add(b1); add(b2); b2.setForeground(Color.red); b1.setForeground(Color.red); b1.setBounds(70,330,70,40); b2.setBounds(150,330,70,40); b1.addActionListener(this); b2.addActionListener(this); addWindowListener(this); setLayout(null); setVisible(true); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { b1.setLabel("Show"); String nm=txtnm.getText(); int l; l=nm.length(); if(l>0 && l<11) { b1.setLabel(txtnm.getText()); } else { txtnm.setText("Enter only 10 Character"); } ta.append("SR NO.="+txtsr.getText()+"nName="+txtnm.getText()+"nCity="+txtcity.getText()); } else if(e.getSource()==b2) { txtsr.setText(""); txtnm.setText(""); }
  • 11. Window 2 Number System txtcity.setText(""); ta.setText(""); b1.setLabel("Show"); } } public void windowActivated(WindowEvent e){} public void windowDeactivated(WindowEvent e){} public void windowClosed(WindowEvent e){} public void windowClosing(WindowEvent e){System.exit(0);} public void windowOpened(WindowEvent e){} public void windowIconified(WindowEvent e){} public void windowDeiconified(WindowEvent e){} public static void main(String args[]) { personal pr=new personal(); } }
  • 13. Window 2 String Concatenation import java.awt.*; import java.awt.event.*; public class demo extends Frame implements ActionListener,WindowListener { Label lblh,lblfn,lblsn,lblr; TextField txtfn,txtsn,txtr; Button b1,b2; demo() { setTitle("Win1"); setSize(300,300); setResizable(false); Font f=new Font("Arial",Font.BOLD,12); Color c=new Color(59,59,59); setBackground(c); Font f1=new Font("Arial",Font.BOLD,16); lblh=new Label("String Concatenation");add(lblh);lblh.setBounds(60,40,170,30); lblh.setFont(f1); lblh.setForeground(Color.gray); lblfn=new Label("Enter 1st Name:");add(lblfn);lblfn.setBounds(10,80,110,30); lblfn.setFont(f); lblfn.setForeground(Color.white); lblsn=new Label("Enter 2nd Name:");add(lblsn);lblsn.setBounds(10,120,110,30); lblsn.setFont(f); lblsn.setForeground(Color.white); lblr=new Label("Result:");add(lblr);lblr.setBounds(10,160,110,30); lblr.setFont(f); lblr.setForeground(Color.white); Color c1=new Color(184,184,114); txtfn=new TextField();add(txtfn);txtfn.setBounds(120,80,130,30); txtfn.setFont(f);
  • 14. Window 2 String Concatenation txtfn.setBackground(c1); txtsn=new TextField();add(txtsn);txtsn.setBounds(120,120,130,30); txtsn.setFont(f); txtsn.setBackground(c1); txtr=new TextField();add(txtr);txtr.setBounds(120,160,130,30); txtr.setFont(f); txtr.setBackground(c1); txtr.setEditable(false); b1=new Button("Show"); add(b1);b1.setBounds(40,210,80,40); b1.setFont(f); b1.setBackground(c1); b2=new Button("Clear");add(b2);b2.setBounds(170,210,80,40); b2.setFont(f); b2.setBackground(c1); b1.addActionListener(this); b2.addActionListener(this); addWindowListener(this); setLayout(null); setVisible(true); } public void actionPerformed(ActionEvent e) { String s,s1,f; if(e.getSource()==b1) { s=txtfn.getText(); s1=txtsn.getText(); f=s.concat(" "+s1); txtr.setText(f); } else if(e.getSource()==b2) {
  • 15. Window 2 String Concatenation txtfn.setText(""); txtsn.setText(""); txtr.setText(""); } } public void windowActivated(WindowEvent e){} public void windowDeactivated(WindowEvent e){} public void windowClosed(WindowEvent e){} public void windowClosing(WindowEvent e){System.exit(0);} public void windowOpened(WindowEvent e){} public void windowIconified(WindowEvent e){} public void windowDeiconified(WindowEvent e){} public static void main(String args[]) { demo obj=new demo(); } }
  • 17. Window 3 Arithmatic Calculation mport java.awt.*; import java.awt.event.*; public class arithcalc extends Frame implements ActionListener,WindowListener { Label lblf,lbls,lblr; TextField txtf,txts,txtr; Button bp,bs,bd,bm,bmo,bc; public arithcalc() { setTitle("Number"); setSize(500,500); setResizable(false); lblf=new Label("Enter First Number : "); lbls=new Label("Enter Second Number : "); lblr=new Label("Result : "); txtf=new TextField(); txts=new TextField(); txtr=new TextField(); txtr.setEditable(false); bp=new Button("+"); bs=new Button("-"); bm=new Button("*"); bd=new Button("/"); bmo=new Button("%"); bc=new Button("Clear"); setLayout(new GridLayout(4,14)); Panel p1=new Panel(new GridLayout(1,3)); Panel p2=new Panel(new GridLayout(1,3));
  • 18. Window 3 Arithmatic Calculation Panel p3=new Panel(new GridLayout(1,3)); Panel p4=new Panel(new GridLayout(1,5)); p1.add(lblf);p1.add(txtf);p1.add(new Label()); p2.add(lbls);p2.add(txts);p2.add(bc); p3.add(lblr);p3.add(txtr);p3.add(new Label()); p4.add(bp);p4.add(bs);p4.add(bm);p4.add(bd);p4.add(bmo); add(p1); add(p2); add(p3); add(p4); bp.addActionListener(this); bs.addActionListener(this); bm.addActionListener(this); bd.addActionListener(this); bmo.addActionListener(this); bc.addActionListener(this); addWindowListener(this); setVisible(true); } public void actionPerformed(ActionEvent e) { int a,b,c; String s; try{ if(e.getSource()==bp) { a=Integer.parseInt(txtf.getText()); b=Integer.parseInt(txts.getText()); c=a+b; s=String.valueOf(c); txtr.setText(s); } else if(e.getSource()==bs) { a=Integer.parseInt(txtf.getText()); b=Integer.parseInt(txts.getText());
  • 19. Window 3 Arithmatic Calculation c=a-b; s=String.valueOf(c); txtr.setText(s); } else if(e.getSource()==bm) { a=Integer.parseInt(txtf.getText()); b=Integer.parseInt(txts.getText()); c=a*b; s=String.valueOf(c); txtr.setText(s); } else if(e.getSource()==bd) { a=Integer.parseInt(txtf.getText()); b=Integer.parseInt(txts.getText()); c=a/b; s=String.valueOf(c); txtr.setText(s); } else if(e.getSource()==bmo) { a=Integer.parseInt(txtf.getText()); b=Integer.parseInt(txts.getText()); c=a%b; s=String.valueOf(c); txtr.setText(s); } else if(e.getSource()==bc) { txtf.setText(""); txts.setText(""); txtr.setText(""); } } catch(Exception e1) {} }
  • 20. Window 3 Arithmatic Calculation public void windowActivated(WindowEvent e){} public void windowDeactivated(WindowEvent e){} public void windowClosed(WindowEvent e){} public void windowClosing(WindowEvent e){System.exit(0);} public void windowOpened(WindowEvent e){} public void windowIconified(WindowEvent e){} public void windowDeiconified(WindowEvent e){} public static void main(String args[]) { arithcalc nm=new arithcalc(); } }
  • 21. Window 4 Upper case lower case
  • 22. Window 4 Upper case lower case import java.awt.*; import java.awt.event.*; public class upper extends Frame implements ActionListener,WindowListener { Label lblh,lblnm,lblup,lbllo; TextField txtnm,txtup,txtlo; Button b1,b2; public upper() { setTitle("Upper & Lower"); setSize(350,300); setResizable(false); setBackground(Color.black); lblh=new Label("Upper &Lower Case");add(lblh);lblh.setBounds(100,40,150,30); Font f=new Font("Lucido Cansole",Font.BOLD,15); lblh.setFont(f); lblh.setForeground(Color.white); lblnm=new Label("Enter Name");add(lblnm);lblnm.setBounds(10,80,150,30); Font fo=new Font("Lucido Cansole",Font.BOLD,14); lblnm.setFont(fo); lblnm.setForeground(Color.white); lblup=new Label("Change UpperCase");add(lblup);lblup.setBounds(10,120,150,30); lblup.setFont(fo); lblup.setForeground(Color.white); lbllo=new Label("Change LowerCase");add(lbllo);lbllo.setBounds(10,160,150,30); lbllo.setFont(fo); lbllo.setForeground(Color.white); txtnm=new TextField();add(txtnm);txtnm.setBounds(170,80,150,30); txtnm.setFont(fo); txtup=new TextField();add(txtup);txtup.setBounds(170,120,150,30); txtup.setFont(fo); txtup.setEditable(false);
  • 23. Window 4 Upper case lower case public void windowActivated(WindowEvent e){} public void windowDeactivated(WindowEvent e){} public void windowClosed(WindowEvent e){} public void windowClosing(WindowEvent e){System.exit(0);} public void windowOpened(WindowEvent e){} public void windowIconified(WindowEvent e){} public void windowDeiconified(WindowEvent e){} public static void main(String args[]) { upper u=new upper(); } }
  • 24. Window 4 Upper case lower case txtlo=new TextField();add(txtlo);txtlo.setBounds(170,160,150,30); txtlo.setFont(fo); txtlo.setEditable(false); b1=new Button("Show");add(b1);b1.setBounds(80,200,90,40); b1.setFont(fo); b2=new Button("Clear");add(b2);b2.setBounds(230,200,90,40); b2.setFont(fo); b1.addActionListener(this); b2.addActionListener(this); addWindowListener(this); setLayout(null); setVisible(true); } public void actionPerformed(ActionEvent e) { String s,str,s1; if(e.getSource()==b1) { s1=txtnm.getText(); s=s1.toUpperCase(); txtup.setText(s); s=s1.toLowerCase(); txtlo.setText(s); } else if(e.getSource()==b2) { txtnm.setText(""); txtup.setText(""); txtlo.setText(""); } }