Saturday, 10 August 2013

AVERAGE MARKS , DISTINCSION , GRADE AND TOTAL MARKS     USE THE FOLLOWING SCRIPT IN NETBEANS AND CHANGE TEXTFEILD NAME ACORDINGLY

















SCRIPT FOR COMPUTE BUTTON

// Declare & Initialise variable for storing Subject marks

  int english=Integer.parseInt(txtsc.getText());
 int maths=Integer.parseInt(txtmaths.getText());
 int science=Integer.parseInt(txtsc.getText());
int history=Integer.parseInt(txthist.getText());

//Compute and set total marks
int total =english+maths+science+history;
txttot.setText(" "+total);
//Compute and get Average marks
int average=total/4;
txtavg.setText(" "+average);
//Compute and set Resultand Grade

if (average>=75)
{txtr.setText("Distinction");
txtg.setText("A");}
else if (average>=60)
{txtr.setText("First Class");
txtg.setText("B");}
else if (average>=50)
{txtr.setText("Second Class");
txtg.setText("C");}
else if (average>=40)
{txtr.setText("Average");
txtg.setText("D");}
else
{txtr.setText("Fail");

txtg.setText("F");}


SCRIPT FOR EXIT BUTTON

System.exit(0);                                                            // TO EXIT PROGRAM
HOW TO CREATE A HTML WEBPAGE    USE THE FOLLOWING SCRIPT IN NOTE PAD




OPEN  NOTE PAD AND PASTE THE FOLLOWING SCRIPT

<HTML>
<HEAD>
<TITLE>ONLINE GAMES</TITLE>
</HEAD>
<center>
<body bgcolor="pink" link="green">
<font color="red" face="arial">
<h1>GAMES GALORE</h1>
</center>
</font>
<br>
<br>
<center>
<h2>THE BEST ONLINE GAMES SITE</h2>
</center>
<font face="arial"color="maroon">
<p>WELCOME TO GAMES GALORE....the best online games site.You may view the content within this site using any client browser and you can download games to play them
off-line.</p>
<h2>Featured games:</h2>
<ol type=1>
<a href="ppuzzle.html">
<LI>Puzzle Games
</A>
</LI>
<UL TYPE="square">
<LI>Tetris</LI>
<LI>Cubis</LI></ul>
<A href="card.html">
<LI>Card Games</LI>
</A>
<ol TYPE="i">
<LI>Solitaire</LI>
<LI>Hearts</LI>
</OL>

<a href="action.html">                                       



 SAVE THE FILE WITH EXTENSION .html 
 YOUR FILE WILL SAVE IN SAME BROWSER FILE WHICH YOU USE 
 PREFERRED SAVE IT IN SAME FOLDER ON YOUR DESKTOP  

Friday, 9 August 2013

HOW TO CONVERT TEXT IN DIFFERENT  FONTS    USE THE FOLLOWING SCRIPT IN NETBEANS AND CHANGE TEXTFEILD NAME ACORDINGLY




SCRIPT FOR RADIO BUTTON PLAIN

txtjTextField1.setFont(new Font("helvetica",Font.PLAIN,14));


SCRIPT FOR RADIO BUTTON ITALIC


txtjTextField1.setFont(new Font("helvetica",Font.ITALIC,14));


SCRIPT FOR RADIO BUTTON BOLD


txtjTextField1.setFont(new Font("helvetica",Font.BOLD,14));


SCRIPT FOR RADIO BUTTON BOLD/ITALIC


txtjTextField1.setFont(new Font("helvetica",Font.BOLD+Font.ITALIC,14));


SCRIPT FOR  BUTTON EXIT

System.exit(0);


Thursday, 8 August 2013

HOW TO CONVERT TEMPRATURE IN FARANITE  AND CELCIUS    USE THE FOLLOWING SCRIPT IN NETBEANS AND CHANGE TEXTFEILD NAME ACORDINGLY




SCRIPT FOR CONVERT BUTTON
        int ch=0;
        if(opt1.isSelected())
        {ch=1;}
        if(opt2.isSelected())
        {ch=2;}
        int f,c;
        double c1=0,f1=0;
        switch(ch)
        {case 1:
             f=Integer.parseInt(txttemp.getText());
             c1=5.0/9*(f-32);
             txtcon.setText(" "+Math.round(c1));
             break;
            case 2:
                c=Integer.parseInt(txttemp.getText());
                f1=1.8*c+32;
                txtcon.setText(" "+Math.round(f1));
                break;
default:
                txtcon.setText("invalid choice!!");

}

SCRIPT FOR EXIT BUTTON

 System.exit(0);
HOW TO CONCAT TWO NAMES    USE THE FOLLOWING SCRIPT IN NETBEANS AND CHANGE TEXTFEILD NAME ACORDINGLY




ON THE TOP OF SOURCE PAGE WRITE THE FOLLOWING SCRIPT



  import javax.swing.JOptionPane;


SCRIPT FOR CLICK TO CONCATENATE BUTTON



JOptionPane.showMessageDialog(this,jTextField1.getText()+"  "+jTextField2.getText());


SCRIPT FOR EXIT BUTTON


 System.exit(0);

Wednesday, 7 August 2013

HOW TO MAKE VOWEL FINDER    USE THE FOLLOWING SCRIPT IN NETBEANS AND CHANGE TEXTFEILD NAME ACORDINGLY






SCRIPT FOR SUBMIT BUTTON

    String n=jTextField1.getText();
     
   if (n.equals("a"))
    JOptionPane.showMessageDialog(this,n+" is a vowel");

   else if (n.equals("e"))
    JOptionPane.showMessageDialog(this,n+" is a vowel");

         else if (n.equals("i"))
    JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("o"))
    JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("u"))
    JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("A"))
    JOptionPane.showMessageDialog(this,n+" is a vowel type in lower case");

              else if (n.equals("E"))
    JOptionPane.showMessageDialog(this,n+" is a vowel type in lower case");

             else if (n.equals("I"))
    JOptionPane.showMessageDialog(this,n+" is a vowel type in lower case");

             else if (n.equals("O"))
    JOptionPane.showMessageDialog(this,n+" is a vowel type in lower case");

              else if (n.equals("U"))
    JOptionPane.showMessageDialog(this,n+" is a vowel type in lower case");


              else if (n.equals("B"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");



              else if (n.equals("C"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");


              else if (n.equals("D"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");


              else if (n.equals("F"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");


              else if (n.equals("G"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");


              else if (n.equals("H"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("J"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("K"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("L"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("M"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("N"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("P"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("Q"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("R"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("S"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("T"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("V"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("W"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("X"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("Y"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");

              else if (n.equals("Z"))
    JOptionPane.showMessageDialog(this,n+" is a not vowel type in lower case");
       else if (n.equals("b")||n.equals("c")||n.equals("d")||n.equals("f")||n.equals("g")
     ||n.equals("h")||n.equals("j")||n.equals("k")||n.equals("l")||n.equals("m")
     ||n.equals("n")||n.equals("p")||n.equals("q")||n.equals("r")||n.equals("s")
     ||n.equals("t")||n.equals("v")||n.equals("w")||n.equals("x")||n.equals("y")
     ||n.equals("z"))
         
     JOptionPane.showMessageDialog(this,n+" is NOT a vowel");


    jTextField1.setText("");






                                                        ALTERNATIVELY

 String n=jTextField1.getText();
   
         if (n.equals("a"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("e"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("i"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("o"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("u"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("A"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("E"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("I"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("O"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else if (n.equals("U"))
        JOptionPane.showMessageDialog(this,n+" is a vowel");

        else
        JOptionPane.showMessageDialog(this,n+" is NOT a vowel");

         jTextField1.setText("");

Tuesday, 6 August 2013


HOW TO MAKE ODD NUMBER FINDER    USE THE FOLLOWING SCRIPT IN NETBEANS AND CHANGE TEXTFEILD NAME ACORDINGLY





SCRIPT FOR SUBMIT BUTTON

        jTextField3.setText("");
        int num1=Integer.parseInt(jTextField1.getText());
        int num2=Integer.parseInt(jTextField2.getText());
        int i;
        if (num1%2!=0)
        {
            for (i=num1;i<=num2;i+=2)
            txtr.append(i+" ");
        }
        else
        {   for (i=num1+1;i<=num2;i+=2)
            jTextField3.append(i+" "); }


SCRIPT FOR CLEAR BUTTON

        jTextField1.setText("");
        jTextField2.setText("");
        jTextField3.setText("");


SCRIPT FOR EXIT BUTTON


       System.exit(0);