You are on page 1of 2

09086231301import javax.swing.

*;
import java.awt.*;
import java.awt.event.*;
public class Gui implements ActionListener{
private JTextField txt1 = new JTextField();
private JLabel lb = new JLabel();
private JButton btn = new JButton();
private JFrame form = new JFrame();
public Gui(){
form.setSize(200, 300);
form.setTitle("service provider");
form.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
form.setVisible(true);
btn.addActionListener(this);
Container c =form.getContentPane();
c.add(btn);
c.add(txt1);
c.add(lb);
form.show();
}
public void actionPerformed(ActionEvent e){
String num ;
num= txt1.getText();
Double.parseDouble(num);

switch(num){
case "0803":
System.out.println("MTN is your provider");break;
case "0813":
System.out.println("MTN is your provider");break;
case "0816":
System.out.println("MTN is your provider");break;
case "0810":
System.out.println("MTN is your provider");break;
case "0903":
System.out.println("MTN is your provider");break;
case "0706":
System.out.println("MTN is your provider");break;
case "0703":
System.out.println("MTN is your provider");break;
case "0809":
System.out.println("ETISALAT is your provider");break;
case "0708":
System.out.println("ETISALAT is your provider");break;
case "0818":
System.out.println("ETISALAT is your provider");break;
case "0817":
System.out.println("ETISALAT is your provider");break;
case "0815":
System.out.println("GLO is your provider");break;
case "0807":
System.out.println("GLO is your provider");break;
case "0705":
System.out.println("GLO is your provider");break;
case "0802":
System.out.println("AIRTEL is your provider");
break;
case "0812":
System.out.println("AIRTEL is your provider");break;
case "0702":
System.out.println("AIRTEL is your provider");break;
case "0902":
System.out.println("AIRTEL is your provider");break;
case "0701":
System.out.println("AIRTEL is your provider");break;
case "0808":
System.out.println("AIRTEL is your provider");break;
default:System.out.println("please use a valid number");
}

public static void main(String arg[]){


Gui gui = new Gui();

}
Chapter Two.
2.0 BRIEF HISTROY OF MALLAM AMINU KANO INTERNATIONAL AIRPORT ..
2.1 ABOUT FEDERAL AIRPORTS AUTHORITY OF NIGERIA ..
2.2 VISION ..
2.3 MISSION ..
2.4 FUTURE OUTLOOK ..
2.5 ALPHABET RADIO TELEPHONY

You might also like