Login - c.add"User" p0.add(l1 p0.add(l2 p1.add(l...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
package logconf; import conference.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.sql.*; /// //login class public class Login extends JFrame implements ItemListener { public JFrame f0=null; public JPanel p0=null,p1=null,p2; Font font1; //public String qq=null,ll=null,tt=null; Connection con = null; Statement stml = null; ResultSet rs=null; public JButton adm=null,use=null; Choice c; // logging function public void log() { f0=new JFrame("Conference"); p0=new JPanel(); p1=new JPanel(); p2=new JPanel(); p0.setLayout(new FlowLayout()); //p0.add(adm); //p0.add(use); Icon img=new ImageIcon("arrow.gif"); JLabel l=new JLabel("Login as"); font1 = new Font("",Font.BOLD,26); JLabel l1=new JLabel("Conference Room ",img,JLabel.CENTER); JLabel l2=new JLabel(""); //JLabel l3=new JLabel(""); l1.setFont(font1); c=new Choice(); c.add("Select"); c.add("Administrator");
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: c.add("User"); p0.add(l1); p0.add(l2); p1.add(l); p1.add(c); p0.setBackground(Color.pink); p1.setBackground(Color.pink); c.addItemListener(this); f0.getContentPane().setLayout(new GridLayout(2,1)); f0.getContentPane().add(p0); f0.getContentPane().add(p1); f0.setSize(500,500); f0.getContentPane().setBackground(Color.pink); //f0.getContentPane().setForeground(Color.blue); f0.setVisible(true); } /////// function public void itemStateChanged(ItemEvent evt) { String ob=c.getSelectedItem(); if(ob.equals("Administrator")) { f0.setVisible(false); sample aaa=new sample(); aaa.administrator(); } if(ob.equals("User")) { sample aaa=new sample(); f0.setVisible(false); aaa.usermet(); } } /////// function public static void main(String args) { Login pro=new Login(); pro.log(); } }...
View Full Document

This note was uploaded on 09/08/2011 for the course COMPUTERS 100 taught by Professor Sinha during the Spring '05 term at IIT Kanpur.

Page1 / 2

Login - c.add"User" p0.add(l1 p0.add(l2 p1.add(l...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online