Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

ActionListener

Rahimv's picture

Create an applet which takes number from text field and validates it

1
Your rating: None Average: 1 (7 votes)
  1. /*-*-*-*-*-*-*-*-*--*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  2. Create an applet which takes number from text field and on clicking button labelled
  3. "read" checks whether the number is in range of 0 to 100 or not. If not it should
  4. throw customized exception "Out of Range...". If exception is thrown, put message
Rahimv's picture

Create an applet that takes Login Name and Password from the user and check them

4.5
Your rating: None Average: 4.5 (2 votes)
  1. /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
  2. Create an applet that takes Login Name and Password from the user and check that
  3. Login Name is "demo" and password is "demopassword".
  4. -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
  5. import java.applet.Applet;
Rahimv's picture

Create a button and implement ActionListener interface using applet

3
Your rating: None Average: 3 (2 votes)
  1. /*
  2. Button:
  3. ~~~~~~~
  4.         Button();
  5.         Button(String);
  6.     Methods:-
  7.         String getLabel();
  8.         void setActionCommand(String);
  9.         String getActionCommand();
  10.         void setLabel(String);
  11.      public synchronized void addActionListener(ActionListener);
  12.  
  13. */
  14.  
  15. import java.awt.event.*;
  16. import java.awt.*;
  17. import java.applet.*;
  18.  
  19. /*
Andr's picture

Java Programming Tutorial - ActionListener

Video Tutorial: 
See video
Syndicate content