Beruflich Dokumente
Kultur Dokumente
2.
Problem Explanation
Architecture
Design
Implementation Procedure
Application Code
package faculty;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
/*
<applet code="Faculty" width=300 height=100>
</applet>
*/
public class Faculty extends JApplet implements ItemListener {
JLabel jl,j2;
JTextArea tj,t2;
JScrollPane js;
JTextField t1;
public JLabel j1;
private Object contentPane;
public void init(){
// Get content pane
Container contentPane = getContentPane();
contentPane.setLayout(new FlowLayout());
setSize(600,700);
JComboBox jc = new JComboBox();
jc.setBackground(Color.CYAN);
jc.setForeground(Color.black);
jc.addItem("archana");
jc.addItem("soumya");
jc.addItemListener(this);
Application code
// Create label
j2 = new JLabel(new ImageIcon("mlr.jpg"));
jl = new JLabel(new ImageIcon("archana.jpg"));
j1= new JLabel(new ImageIcon("soumya.jpg"));
j1=new JLabel(new ImageIcon("vani.jpg"));
j1=new JLabel(new ImageIcon("Gouse.jpg"));
j1=new JLabel(new ImageIcon("chugh.jpg"));
j1=new JLabel(new ImageIcon("KiranKumar.jpg"));
j1=new JLabel(new ImageIcon("amarender.jpg"));
int v = ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
t2 = new JTextArea(1,1);
t2.setFont(new Font("Verdana", Font.BOLD+Font.ITALIC, 50));
t2.setText("FACULTY PROFILE SYSTEM");
t2.setForeground(Color.green);
t2.setBackground(Color.LIGHT_GRAY);
contentPane.setBackground(Color.GRAY);
tj = new JTextArea(9,20);
tj.setFont(new Font("serif", Font.ITALIC+Font.BOLD, 16));
tj.setForeground(Color.black);
tj.setBackground(Color.cyan);
js = new JScrollPane(tj,v,h);
Application code
contentPane.add(j2);
contentPane.add(t2);
contentPane.add(jc);
contentPane.add(jl);
contentPane.add(js);
}
@Override
public void itemStateChanged(ItemEvent ie)
{
String s = (String)ie.getItem();
jl.setIcon(new ImageIcon(s+".jpg"));
//Object s1=ie.getSource();
switch (s) {
case "archana":
tj.setText("Name:Mrs.Archana"+"\n"+"Qualif
ication:Mtech"+"\n"+"Designation:Asst.Profe
ssor"+"\n"+"Experience:7years"+"\n"+"Depa
rtment:CSE");
break;
case "vani":
tj.setText("Name:Mrs.Vani"+"\n"+"Qualificat
ion:Btech,Mtech(Ph.D)"+"\n"+"Designation:
Asst.Professor"+"\n"+"Experience:9years"+"\
n"+"Department:CSE");
break;
Output
Output
Output
Applications
The subject is applied in development of GUI applications
The technologies of this subject are useful to develop GUI
and web applications.
The micro project enables students to develop GUI and Web
applications.
References
1. Java Fundamentals A comprehensive Introduction,
Herbert Schildt and Dale Skrien, TMH.
2. Java for Programmers, P.J. Deitel and H.M. Deitel,
Pearson education (OR) Java: How to Program
P.J.Deitel and H.M. Deitel, PHI.
3. Object Oriented Programming through Java, P. Radha
Krishna, Universities Press.
4. Thinking in Java, Bruce Eckel, Peason Education
5. Programming in Java, S. Malhotra and S. Choudary,
Oxford Univ. Press.
Name
Department
Year
13R21A05B5
2nd Cse
13R21A05C6
Gss.Kireeti
2nd Cse
13R21A05C9
IJ.Sai Ram
2nd Cse
Guided by :
B. Madhuravani
THANK YOU