Grid Java source code
#1

Code:
import java.awt.*;
import java.applet.*;
import java.awt.event.*;

/*
<applet code="Grid" width=380 height=150>
</applet>*/

public class Grid extends Applet implements ActionListener
{

    String msg;
    TextField tf1,tf2,tf3,tf4,tf5,tf6;
    TextArea tf7;
    Label lb1,lb2,lb3,lb4,lb5,lb6,lb7,lb8,lb9,lb10,lb11,lb12,lb13;
    Button b;
    

    public void init()
    {

        setLayout(new GridLayout(7,3));

        tf1 = new TextField(20);
        tf2 = new TextField(10);
        tf3 = new TextField(20);
        tf4 = new TextField(5);
        tf5 = new TextField(5);
        tf6 = new TextField(40);
        tf7 = new TextArea(10,50);

        
        lb1 = new Label("Name",Label.RIGHT);
        lb2 = new Label("Class",Label.RIGHT);
        lb3 = new Label("RollNo",Label.RIGHT);
        lb4 = new Label("Marks1",Label.RIGHT);
        lb5 = new Label("Marks2",Label.RIGHT);
        lb6 = new Label("Record",Label.RIGHT);
        lb7 = new Label("Result");                    
        lb8 = new Label(" ");
        lb9 = new Label(" ");
        lb10 = new Label(" ");
        lb11 = new Label(" ");
        lb12 = new Label(" ");
        lb13 = new Label(" ");

        b = new Button("SUBMIT");

        add(lb1);
        add(tf1);
        add(lb8);
        add(lb2);
        add(tf2);
        add(lb9);
        add(lb3);
        add(tf3);
        add(lb10);
        add(lb4);
        add(tf4);
        add(lb11);
        add(lb5);
        add(tf5);
        add(lb12);
        add(lb13);
        add(b);
        add(lb7);
        add(tf6);
        add(lb6);
        add(tf7);

        b.addActionListener(this);

        

    }

            
    public void actionPerformed(ActionEvent ae)
    {

                int k = Integer.parseInt(tf4.getText())+
                        Integer.parseInt(tf5.getText());
                msg = tf1.getText() +tf2.getText()+
                        tf3.getText()+tf4.getText()+tf5.getText();
                tf7.append( msg);

                if(k > 50)
                {    
                        tf6.setText("pass");
                }
        else
                {
                        tf6.setText("Fail");
                }
            
    }

}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: data grid java, grid solver robot code, authorization in the grid java code, four wheeled vehincleg grid java, grid folower source code, java data grid,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Simple Key Events Java source code smart paper boy 3 3,588 07-02-2017, 03:41 PM
Last Post: NARESHLAFOOT
  Window Events Java source code smart paper boy 1 3,667 02-03-2012, 10:48 AM
Last Post: seminar paper
  Inter net banking java source code smart paper boy 3 5,933 01-03-2012, 11:24 AM
Last Post: seminar paper
  UDP server java source code smart paper boy 1 3,805 05-01-2012, 05:50 PM
Last Post: jeslinapeter
  UDP client Java source code smart paper boy 2 3,665 12-12-2011, 09:56 AM
Last Post: seminar addict
  Text Demo Java source code smart paper boy 0 2,070 30-08-2011, 12:44 PM
Last Post: smart paper boy
  Text Area Demo Java source code smart paper boy 0 2,081 30-08-2011, 12:44 PM
Last Post: smart paper boy
  Servlet Database Java source code smart paper boy 0 2,456 30-08-2011, 12:42 PM
Last Post: smart paper boy
  server test Java source code smart paper boy 0 2,257 30-08-2011, 12:42 PM
Last Post: smart paper boy
  Ser To App java source code smart paper boy 0 1,671 30-08-2011, 12:39 PM
Last Post: smart paper boy

Forum Jump: