Lawte Java source code
#1

Code:
/*                        Text Validation                    */
import java.awt.*;
import java.applet.*;
public class lawte extends Applet
{
    numberTextField ntext1;
    Button b1;
    class numberTextField extends TextField
    {
        public numberTextField(int cols)
        {
                        super( cols );
        }
        public boolean keyDown(Event evt,int key)
                {
            char keychar = ( char ) key;
                        if(( keychar > '0' ) && ( keychar < '9' ))
                                return super.keyDown(evt, key);
            else
                return true;
        }
    }
    public void init()
    {
                ntext1 = new numberTextField( 20 );
                b1 = new Button( "CLEAR" );
                add( ntext1 );
                add( b1 );
                setForeground( Color.yellow );
                setBackground( Color.red );
    }
        public boolean action(Event evt, Object obj)
    {
                if( evt.target == "CLEAR" )
        {
                        ntext1.setText(" ");
                        return true;
        }
        else
            return false;
    }
}
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

[-]
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,584 07-02-2017, 03:41 PM
Last Post: NARESHLAFOOT
  Window Events Java source code smart paper boy 1 3,662 02-03-2012, 10:48 AM
Last Post: seminar paper
  Inter net banking java source code smart paper boy 3 5,928 01-03-2012, 11:24 AM
Last Post: seminar paper
  UDP server java source code smart paper boy 1 3,802 05-01-2012, 05:50 PM
Last Post: jeslinapeter
  UDP client Java source code smart paper boy 2 3,660 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,079 30-08-2011, 12:44 PM
Last Post: smart paper boy
  Servlet Database Java source code smart paper boy 0 2,454 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: