Monday, October 18, 2010

JAVA SOURCE CODE FOR CHESS BOARD

import java.awt.*;
import javax.swing.*;

public class ElliotChess extends JFrame {

    private JPanel mainPanel;
    private DrawingPanel drawPanel;
    static ElliotChess myChessBoard;
    private int x = 100, y = 60;

    public ElliotChess() {
   
        super("CHESS BOARD WITH CHESS PIECES");
   
        mainPanel = new JPanel();
        mainPanel.setLayout(null);
        mainPanel.setBackground(Color.RED);

        drawPanel= new DrawingPanel();
        drawPanel.setBounds(mainPanel.getWidth() / 2, mainPanel.getHeight() / 2, 1000, 1000);
        drawPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 5));
        mainPanel.add(drawPanel, BorderLayout.CENTER);
        setContentPane(mainPanel);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(1020,720);
        setLocationRelativeTo(null);
        setVisible(true);

      

    }

    public static void main(String[] args) {
         myChessBoard = new  ElliotChess();
           }


    class DrawingPanel extends JPanel {
      private int x = 100, y = 60;   

       protected void paintComponent(Graphics g) {
          super.paintComponent(g);
          Graphics2D g2d = (Graphics2D) g;
          drawingMethod(g2d);
       }

    private void drawingMethod(Graphics2D g2d) {
       
       for (int i = 0; i <= 8; ++i) {
            g2d.drawLine(x, (y * i) + 60, x + 800, (y * i) + 60);
            
            }
         
        for (int j = 0; j <= 8; ++j) {
                g2d.drawLine((x * j) + 100, y, (x * j) + 100, y + 480);
            }
      
        g2d.setColor(Color.BLACK);
        g2d.fillRect(200, 60, 100, 60);       
      
        ImageIcon myImage3 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\h.JPG");
        Image picImage3 = myImage3.getImage();
        g2d.drawImage(picImage3,130,65, this);
       
        ImageIcon myImage = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\i.jpg");
        Image picImage = myImage.getImage();
        g2d.drawImage(picImage, 230,65, this);
       
        ImageIcon myImage6 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\g.jpg");
        Image picImage6 = myImage6.getImage();
        g2d.drawImage(picImage6, 330,65, this);
       
        g2d.fillRect(400, 60, 100, 60);
        ImageIcon myImage8 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\l.jpg");
        Image picImage8 = myImage8.getImage();
        g2d.drawImage(picImage8, 430,61, this);     
             
       
        ImageIcon myImage9 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\k.jpg");
        Image picImage9 = myImage9.getImage();
       
       g2d.fillRect(100, 120, 100, 60);
        g2d.fillRect(300, 120, 100, 60);
        g2d.fillRect(500, 120, 100, 60);
        g2d.fillRect(700, 120, 100, 60);

        g2d.drawImage(picImage9, 130,125, this);       
        g2d.drawImage(picImage9, 230,125, this);       
        g2d.drawImage(picImage9, 330,125, this);       
        g2d.drawImage(picImage9, 430,125, this);       
        g2d.drawImage(picImage9, 530,125, this);      
        g2d.drawImage(picImage9, 630,125, this);       
        g2d.drawImage(picImage9, 730,125, this);
        g2d.drawImage(picImage9, 830,125, this);        

        g2d.fillRect(200, 180, 100, 60);
        g2d.fillRect(400, 180, 100, 60);
        g2d.fillRect(600, 180, 100, 60);
        g2d.fillRect(800, 180, 100, 60);       
      
        g2d.fillRect(100, 240, 100, 60);
        g2d.fillRect(300, 240, 100, 60);
        g2d.fillRect(500, 240, 100, 60);
        g2d.fillRect(700, 240, 100, 60);
         
        g2d.fillRect(200, 300, 100, 60);
        g2d.fillRect(400, 300, 100, 60);
        g2d.fillRect(600, 300, 100, 60);
       g2d.fillRect(800, 300, 100, 60);
         
        g2d.fillRect(100, 360, 100, 60);
        g2d.fillRect(300, 360, 100, 60);
        g2d.fillRect(500, 360, 100, 60);
        g2d.fillRect(700, 360, 100, 60);

        g2d.fillRect(800, 60, 100, 60);
        
        ImageIcon myImage4 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\h.jpg");
        Image picImage4 = myImage4.getImage();
        g2d.drawImage(picImage4, 830,65, this);
       
        ImageIcon myImage2 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\i.jpg");
        Image picImage2 = myImage2.getImage();
        g2d.drawImage(picImage2,730,65, this);
       
        g2d.fillRect(600, 60, 100, 60);
        ImageIcon myImage5 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\g.jpg");
        Image picImage5 = myImage5.getImage();
        g2d.drawImage(picImage5, 630,65, this);
       
        ImageIcon myImage7 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\j.jpg");
        Image picImage7 = myImage7.getImage();
        g2d.drawImage(picImage7, 530,61, this);


              
        ImageIcon myImage17 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\e.jpg");
        Image picImage17 = myImage17.getImage();
        g2d.drawImage(picImage17,130,428, this);
       
        g2d.fillRect(200, 420, 100, 60);
        g2d.fillRect(400, 420, 100, 60);
        g2d.fillRect(600, 420, 100, 60);
        g2d.fillRect(800, 420, 100, 60);
        g2d.fillRect(100, 480, 100, 60);
        
        g2d.drawImage(picImage17,230,428, this);
        g2d.drawImage(picImage17,330,428, this);
        g2d.drawImage(picImage17,430,428, this);     
        g2d.drawImage(picImage17,530,428, this);
        g2d.drawImage(picImage17,630,428, this);
        g2d.drawImage(picImage17,730,428, this);
        g2d.drawImage(picImage17,830,428, this);
     
        ImageIcon myImage50 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\b.jpg");
        Image picImage50 = myImage50.getImage();
        g2d.drawImage(picImage50,130,486, this);

      
        ImageIcon myImage28 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\c.jpg");
        Image picImage28 = myImage28.getImage();
        g2d.drawImage(picImage28,230,486, this);
       
        g2d.fillRect(300, 480, 100, 60);
        ImageIcon myImage29 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\a.jpg");
        Image picImage29 = myImage29.getImage();
        g2d.drawImage(picImage29,330,486, this);
       
        ImageIcon myImage25 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\b.jpg");
        Image picImage25 = myImage25.getImage();
        g2d.drawImage(picImage25,830,486, this);
      
        g2d.fillRect(700, 480, 100, 60);
        ImageIcon myImage27 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\c.jpg");
        Image picImage27 = myImage27.getImage();
        g2d.drawImage(picImage27,730,486, this);
       
        ImageIcon myImage30 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\a.jpg");
        Image picImage30 = myImage30.getImage();
        g2d.drawImage(picImage30,630,486, this);
       
        g2d.fillRect(500, 480, 100, 60);
        ImageIcon myImage31 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\d.jpg");
        Image picImage31 = myImage31.getImage();
        g2d.drawImage(picImage31,530,480, this);
       
        ImageIcon myImage32 = new ImageIcon("C:\\Users\\Ganizani\\Documents\\chesspieces\\f.jpg");
        Image picImage32 = myImage32.getImage();
        g2d.drawImage(picImage32,430,480, this);
         
         }
      }
   }

CHESS BOARD WITH PIECES


DESIGN OF THE CHESS BOARD WITH PIECES
GENERAL OBJECTIVE
Below is the chess board as a starting point of designing 2D graphics. This is just the board with the pieces on it. It performs no any action, that is, a person cannot move the pieces. However, the project is under construction and this is just the first phase of it. It is the intention of the designer to come up with the real chess game where an individual will be able to play the game. It is believed that the project will be completed by the end of this month since the designer is occupied with other academic activities like exams and assignments.



Saturday, October 9, 2010

programming code on student registration system

import javax.swing.*;
import java.awt.*;
import java.io.*;
import java.awt.event.*;


public class studreg extends JFrame{

JFrame frame=new JFrame();

   int i,a,j;
   JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17;
   JTextField t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12;
   JCheckBox c3,c4;
   JRadioButton r1,r2;
      
        JButton Apply,Save,Exit;
        JPanel contentPane;
     
        JComboBox z;
        JComboBox k;
        JComboBox d,m,y;


        JList l;
        GridBagLayout gl=new GridBagLayout();
        GridBagConstraints gbc=new GridBagConstraints();   
        public studreg()
        {
        super("STUDENT REGISTRATION FORM");
            l1=new JLabel("FULL NAME");
            l2=new JLabel("ADDRESS");
            l3=new JLabel("TELEPHONE");
            l4=new JLabel("EnterGender");
            l5=new JLabel("COURSE");
            l6=new JLabel("DATE OF BIRTH");
            l7=new JLabel("COLLEGE ENTRY YR");
            l8=new JLabel("REG NUMBER");
            l9=new JLabel("HOME DISTRICT");
            l10=new JLabel("VILLAGE");
            l11=new JLabel("TA");
            l12=new JLabel("NEXTOFKINDETAILS");
            l13=new JLabel("FULL NAME");
            l14=new JLabel("POSTAL ADDRESS");
            l15=new JLabel("TEL/CELL");
            l16=new JLabel("EMAIL");
                l17=new JLabel("POLY REGISTRATION FORM");
               
                l1.setFont(new Font("Elephant",Font.BOLD,16));
                l2.setFont(new Font("Elephant",Font.BOLD,16));
                l3.setFont(new Font("Elephant",Font.BOLD,16));
            l4.setFont(new Font("Elephant",Font.BOLD,16));
            l5.setFont(new Font("Elephant",Font.BOLD,16));
            l6.setFont(new Font("Elephant",Font.BOLD,16));
            l7.setFont(new Font("Elephant",Font.BOLD,16));
            l8.setFont(new Font("Elephant",Font.BOLD,16));
            l9.setFont(new Font("Elephant",Font.BOLD,16));
            l10.setFont(new Font("Elephant",Font.BOLD,16));
            l11.setFont(new Font("Elephant",Font.BOLD,16));
            l12.setFont(new Font("Elephant",Font.BOLD,16));
            l13.setFont(new Font("Elephant",Font.BOLD,16));
            l14.setFont(new Font("Elephant",Font.BOLD,16));
            l15.setFont(new Font("Elephant",Font.BOLD,16));
            l16.setFont(new Font("Elephant",Font.BOLD,16));
            l17.setFont(new Font("Elephant",Font.BOLD,16));
           
            k=new JComboBox();  
            k.addItem("BAC 4");
            k.addItem("BBA 4");
            k.addItem("BIT 4");
            k.addItem("MSE 4");
            k.addItem("TED 4");
          
            z=new JComboBox();
            for (j=2003;j<=2009;j++)
              {
               z.addItem(""+j);     
              }
                        
       r1=new JRadioButton("Male");
       r2=new JRadioButton("Female");
       Apply=new JButton("Apply");
    
       Save=new JButton("Save");
       Exit=new JButton("Exit");
      
       t1=new JTextField();
       t2=new JTextField(10);
       t3=new JTextField(10);
       t4=new JTextField(10);
       t5=new JTextField(10);
       t6=new JTextField(10);
       t7=new JTextField(10);
       t8=new JTextField(10);
       t9=new JTextField(10);
       t10=new JTextField(10);
         t11=new JTextField();
         t12=new JTextField();
       t1.setFont(new Font("Venderna",Font.BOLD,15));
         t2.setFont(new Font("Venderna",Font.BOLD,15));
         t3.setFont(new Font("Venderna",Font.BOLD,15));
         t4.setFont(new Font("Venderna",Font.BOLD,15));
         t5.setFont(new Font("Venderna",Font.BOLD,15));
         t6.setFont(new Font("Venderna",Font.BOLD,15));
         t7.setFont(new Font("Venderna",Font.BOLD,15));
         t8.setFont(new Font("Venderna",Font.BOLD,15));
         t9.setFont(new Font("Venderna",Font.BOLD,15));
         t10.setFont(new Font("Venderna",Font.BOLD,15));
         t11.setFont(new Font("Venderna",Font.BOLD,15));
         t12.setFont(new Font("Venderna",Font.BOLD,15));
       
                          
       d=new JComboBox();
       m=new JComboBox();
       y=new JComboBox();
     
       for(i=1;i<=31;i++)
          d.addItem(" "+i);  
          m.addItem("Jan");
          m.addItem("Feb");
          m.addItem("Mar");
          m.addItem("Apr");
          m.addItem("May");
          m.addItem("Jun");
          m.addItem("Jul");
          m.addItem("Aug");
          m.addItem("Sept");
          m.addItem("Oct");
          m.addItem("Nov");
          m.addItem("Dec");
         
       for(a=1975;a<=1992;a++)
      {
         y.addItem(""+a);
        
      } 
     
      contentPane=(JPanel)this.getContentPane();
      File file = new File("PERSONAL DETAILS.DOC");
   
      t1.setText(" ");
      t11.setText("  ");
      t2.setText("  ");
      l4.setText("GENDER");
      l5.setText("COURSE");
      l6.setText("DATE OF BIRTH");
      t3.setText("  ");
      t5.setText("  ");
      t6.setText("  ");
      t7.setText("  ");
        l12.setText("NEXT OF KIN DETAILS");
        l12.setFont(new Font("Elephant",Font.BOLD,16));
      t8.setText("  ");
      t12.setText("  ");
      t9.setText("  ");
      t10.setText("  ");
          
      r1.setText("Male");
      r1.setSelected(true);
     
      r2.setText("Female");
      r2.setSelected(true);

      Apply.setText("Apply");
         Apply.addActionListener(
                new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                      JTextArea textarea=new JTextArea();
                      JScrollPane scroll=new JScrollPane( textarea,
                     JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,  
                      JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
                     
      JFrame frame= new JFrame();
            
      if (e.getSource()==Apply){
           String name= t1.getText();
            textarea.append("NAME: "+name+"\n\n");
               
                 if (r2.isSelected())
               textarea.append("SEX:  Female");
             if (r1.isSelected())
               textarea.append("SEX:  Male\n\n");
               
           String name1= t11.getText();
            textarea.append("HOME ADDRESS: "+name1+"\n\n");
         
         String name3 =  t2.getText();
                textarea.append("TELEPHONE #: "+ name3+"\n\n");
         String name4=t5.getText();
                textarea.append("HOME DISTRICT: "+name4+"\t");
         String name5= t6.getText();
                textarea.append("VILLAGE: "+name5+"\t");
         String name6=t7.getText();
                textarea.append("T/A: "+name6+"\n\n");
         String name12 = (String)d.getSelectedItem();
                textarea.append("DATE OF BIRTH: "+name12+" ");
         String name13 = (String)m.getSelectedItem();
                textarea.append(name13+" ");
         String name14 = (String)y.getSelectedItem();
                textarea.append(name14+"\n\n");
            String name2=t3.getText();
                textarea.append("REGISTRATION NUMBER: "+name2+"\n\n");
         String enteredText = (String)z.getSelectedItem();
                textarea.append("COLLEGE ENTRY YEAR: "+enteredText+"\n\n");
            String name11= (String)k.getSelectedItem();
                   textarea.append("COURSE: "+name11+"\n\n");
           
            String name15=l12.getText();
                   textarea.append("\t\tNEXT OF KIN DETAILS\t\t\n\n");       
            String name7= t8.getText();
                textarea.append("FULL NAME: "+name7+"\n\n");
         String name8= t9.getText();
                textarea.append("TEL/CELL: "+name8+"\n\n");
         String name9= t12.getText();
                textarea.append("POSTAL ADDRESS: "+name9+"\n\n");
         String name10= t10.getText();
                textarea.append("EMAIL: "+name10+" ");
           textarea.setFont(new Font("Elephant",Font.BOLD,16));
           textarea.setEditable(false);
      }   
           frame.add(scroll);
           frame.setTitle("APPLICANT'S PERSONAL DETAILS");
           frame.setSize(500,500);
           frame.setLocation(350,50);
           frame.setVisible(true);

     }
});
  
       Exit.setText(" Exit");
          Exit.addActionListener(
                 new ActionListener() {
                    public void actionPerformed(ActionEvent e)
                   {
                       System.exit(0);
                                         }
         
    
                });
               

         gbc.fill=GridBagConstraints.BOTH;
         gbc.weightx=100.0;
         gbc.weighty=100.0;
            put(0,2,1,1,l17);
         put(1,0,1,1,l1);
         put(1,1,1,1,t1);
         put(2,2,1,1,l8);
         put(2,3,1,1,t3);
         put(2,0,1,1,l2);
         put(2,1,1,1,t11);
         put(3,0,1,1,l3);
         put(3,1,1,1,t2);
         put(3,2,1,1,l7);
         put(3,3,1,1,z);
         put(4,0,1,1,l4);
         put(4,1,1,1,r1);
         put(4,2,1,1,r2);
         put(5,0,1,1,l9);
         put(5,1,1,1,t5);
         put(5,2,1,1,l10);
         put(5,3,1,1,t6);
         put(5,4,1,1,l11);
         put(5,5,1,1,t7);
         put(6,0,1,1,l5);
         put(6,1,1,1,k);
         put(7,0,1,1,l6);
         put(7,1,1,1,d);
         put(7,2,1,1,m);
         put(7,3,1,1,y);
         put(10,2,1,1,l12);
         put(11,0,1,1,l13);
         put(11,1,1,1,t8);
         put(12,0,1,1,l14);
         put(12,1,1,1,t12);
         put(11,2,1,1,l15);
         put(11,3,1,1,t9);
         put(12,2,1,1,l16);
         put(12,3,1,1,t10);
         put(13,1,1,1,Apply);
         put(13,2,1,1,Save);
         put(13,3,1,1,Exit);
       
         Save.addMouseListener(new Save());
         setSize(900,700);
         setLocationRelativeTo(null);
         setVisible(true);
         setResizable(true);
           
   }
   
  public class Save extends MouseAdapter{
     public void mouseClicked(MouseEvent e)

           {
           JFrame aFrame = new JFrame();
           JFileChooser fChooser = new JFileChooser();
           int result = fChooser.showSaveDialog(aFrame);
           if(result==JFileChooser.APPROVE_OPTION){
             
            File outFile = null;
             outFile=fChooser.getSelectedFile();
                    
         if (outFile.exists())
            JOptionPane.showMessageDialog(null, "FILE ALREADY EXISTS");
         else
            
         try{
         FileOutputStream fileStream = new   FileOutputStream(outFile);
         DataOutputStream dataStream = new   DataOutputStream(fileStream);
         dataStream.writeUTF(t1.getText());
         dataStream.writeUTF(t2.getText());
         dataStream.writeUTF(t3.getText());
         dataStream.writeUTF(t4.getText());
         dataStream.writeUTF(t5.getText());
         dataStream.writeInt(z.getSelectedIndex());
         dataStream.writeInt(k.getSelectedIndex());
         dataStream.writeInt(d.getSelectedIndex());
         dataStream.writeInt(m.getSelectedIndex());
        
         JLabel mylabel=new JLabel("WELCOME TO STUDENT REGISTRATION SYSTEM");
JLabel l1=new JLabel("EnterName");
JLabel l2=new JLabel("EnterAddress");
JLabel l3=new JLabel("Entertel.phno");
JLabel l4=new JLabel("EnterGender");
JLabel l5=new JLabel("EnterCourse");
JLabel l6=new JLabel("EnterDOB");
JLabel l7=new JLabel("CollegeEntryYear");
JLabel l8=new JLabel("RegNumber");
JLabel l9=new JLabel("HomeDistrict");
JLabel l10=new JLabel("Village");
JLabel l11=new JLabel("T/A");
JLabel l12=new JLabel("NEXT OF KIN DETAILS");
l13=new JLabel("FullName");
JLabel l14=new JLabel("PostalAddress");
JLabel l15=new JLabel("Tel/Cell");
JLabel l16=new JLabel("Email");       

         fileStream.close();
         }
         catch(IOException event){
           JOptionPane.showMessageDialog(null, "Save with file name");
     
         } 
        }
      }
   }
 
 

 
       public static void main(String args[])
         { 
  
           studreg bt=new studreg();
                }
           void put(int r,int c,int w,int h,Component e)
           {
          
            Container cp=this.getContentPane();
         cp.setLayout(gl);
         gbc.gridx=c;
         gbc.gridy=r;
         gbc.gridwidth=w;
         gbc.gridheight=h;
         gbc.insets = new Insets(5, 5, 5, 5);
         gl.setConstraints(e,gbc);
         cp.add(e);
      }       
   }

Thursday, October 7, 2010

UNIVERSITY OF MALAWI


THE POLYTECHNIC

FACULTY OF APPLIED SCIENCES
DEPARTMENT OF MATHEMATICS AND STATISTICS

DESIGNING A STUDENT REGISTRATION FORM
(Java Programming Language)

PRESENTED TO
MR. B. KANKUZI

BY
 GANIZANI ELLIOT
(MSE/06/PE/0027)


DUE DATE
08TH OCTOBER, 2010


STUDENT REGISTRATION FORM
INTRODUCTION
The main objective of the program is to design a student registration form interface by which students will fill in the form on the beginning of the semester as a requirement by the college. The form includes not only the basic information about the student but also the details of the applicant’s next of kin. On the form there are several attributes which were designed in such a way that users interact very easily.
 ATTRIBUTES
The following are the attributes which appear on the form: the type of the form as well as its name; it also contains the fields which demand the applicant to fill in the personal and next of kin’s details. These applicant details include the full name of the applicant, registration number, date of birth, sex, home district (as well as village and T/A), telephone number, contact address, course of study, and college entry year.
In case of emergency and other communication that need parental/guardian intervention, the form also asks the student to give the details of the next of kin (i.e. parents/uncle/guardian). The information required includes the name of the parent/guardian, contact address, telephone number, and email address.
After filling in the details, the applicant will be able to confirm his/her entries by clicking on the “Apply” button to display the entered details in a separate window. This display page of the entered information allows the applicant to check if the entered values are correct, that is, if the information is the intended one. In case the applicant entered wrong information he can go back to edit those fields that were wrongly entered.
If the applicant is satisfied, then he/she can save the information on the hard disk or database by clicking the “Save” button so that the school can retrieve the information at any given time.

SNAPSHOTS 
Different snap shots of the form have been taken at a particular level to explain better how the form works. The form has a fixed size which means applicants will not be able to enlarge or minimize it. Figure 1 below shows the attributes on the form and in particular how the applicant interacts with it. As already described above, the form contains personal details of the applicant which appear on top of the form, while on the bottom are the fields that need next of kin’s details. Also there are some fields which have been designed in a simple way in order to avoid errors as well as to minimize the time since there is always congestion during the period of registration which see 5-6 students waiting for one computer to register. This was achieved through the use of combo boxes as well as radio buttons that allow the applicant to just select the already defined values.
Just beneath the form there are buttons that are used in the program for different purposes. The figure 1 below shows three buttons which are “Apply”, “Save”, and “Exit” buttons. The function of each button will be fully explained in the next pages.





Figure 1: the general view of the Student Registration Form
After filling in the fields of the form then it looks like the one in figure 2 below. The combo box only illustrates how the user selects a particular value. For example, one has to select the course from the pop up menu under the course attribute.



Figure 2: The form with fields filled with the Applicant’s details.
After entering the values the applicant may now want to view the information he entered. To do this he/she has to click on the “Apply” button. Then a separate page containing the entered values will now be displayed.
The details are displayed on a separate page which is shown in Figure 3 below. The information is displayed on condition that all the fields are filled in. However, suppose for example, the applicant does leave some spaces unfilled then the alert dialog box has to be displayed telling the applicant that he/she left some fields unfilled. In this case, the message like one in Figure 4 below is displayed. The alert message is displayed since the applicant did not fill in the name’s field, and the registration number’s field.





Figure 3: A separate page displaying the entered information
The dialog box in figure 4 below, as I have already explained above, is there just to alert the user that s/he has left some fields unfilled which need to be filled in. This gives the applicant an opportunity to refill the spaces in case s/he left it unknowingly or because s/he was in a hurry.  In so doing it leaves the applicant with no choice of leaving some spaces unfilled because doing so it means registration cannot be completed.



Figure 4: The dialog box alerts the user that he left unfilled areas.
The “Exit” button, however, is there to allow the applicant to close the form after completing registration process. Though there is already a close button on the upper right corner of the window a good designer will always make a user friendly interface to give more options for performing the same operation. This is why the “Exit” button had to be put. Once a user clicks on it the window goes off.
Again on the registration form there is the “Save” button, to the lowest end in between the “Apply” and “Exit” buttons, which is used to save the file to the hard disk. The college, at one point, they need the student’s information for one reason or the other. Once the applicant fills in the form and s/he is sure that the details given are correct then s/he can now save the data by clicking the “Save” button to save the file. As soon as one clicks it, the Save dialog box pops up that requires the user to enter the name of the file and to indicate the location of the file. The default save location is My Documents. The figure 5 below, shows how the form looks after clicking the Save button.




 Figure 5: The Save As dialog box after clicking on Save button
In case the applicant saves a file with same file name, that is, file that already exists in the preferred location, the alert  diolog box will be displayed telling the applicant that the file name already exists. Figure 6 below shows a dialog box which alerts the applicant that the file name alreay exists in the My Documents location.


Figure 6: A dialog box alerting the user about the already existing file name .

Since the applicant is not allowed to leave any unfilled spaces, then a control was also put that restricts the applicant to save the form while it is blank. If this control was not there, again applicants would save blank pages on the hard disk which would not be of much help to the college. However, if such a case in which the applicant wants to save a blank form happen the dialog box will pop up warning that blank file cannot be saved.
Figure 7 below shows the warning dialog box that tells the applicant s/he cannot save a blank file. The Save button is designed more less like the Apply button where one cannot save while leaving unfilled fields on the form.

Figure 7: Warning against saving unfilled form.
Now after saving the file, one who wants to access the saved file can go to the location where the file was saved. By default the location is the My Documents.
CONCLUSION
The main objective of the program was to develop an interface (using Java Programming Language), that can be used not only by college students but also other educational institutions even a secondary school. Due to technological development the online registration system has become of much help to solve those problems that were incurred with the paper registration among them being easy and quick access, as well as for easy storage. The program’s features included that option of saving to the hard disk as well as retrieving from the hard disk. As required by the project supervisor that is how the program behaves otherwise some functionalities were included just to make the program more meaningful than just the interface.