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

Applet

B00055810's picture

Applet

i have a basic applet written just using init, actionlistener
extends Applet implements ActionListener set up but i keep getting message Applet not initilaised - what's the problem?
0
Your rating: None
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

3.2
Your rating: None Average: 3.2 (5 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 an applet with two number textboxes and a sum button

2.75
Your rating: None Average: 2.8 (4 votes)
  1. /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
  2. Create an applet with a button "SUM" and two text boxes "NUM1" and "NUM2" ;
  3. Let user enter two numbers in textboxes when user press SUM button display
  4. the sum of the numbers on the applet.
Rahimv's picture

Create labels and display in applet

2
Your rating: None Average: 2 (1 vote)
  1. /*
  2. Label Control
  3. ~~~~~~~~~~~~~
  4.         public static final int LEFT;
  5.         public static final int CENTER;
  6.         public static final int RIGHT;
  7. Constructors:-
  8.         Label();
  9.         Label(String);
  10.         Label(String,int);
  11. Methods:-
  12.         public int getAlignment();
  13.         public synchronized void setAlignment(int);            
  14.         public String getText();
Rahimv's picture

Create Checkbox controls, implement ItemListener and arrange them using FlowLayout

0
Your rating: None
  1. /*
  2. Layout Manager
  3. ~~~~~~~~~~~~~~
  4. FlowLayout
  5. ==========
  6. FlowLayout()
  7. FlowLayout(int how)
  8. FlowLayout(int how, int horz,int vert)
  9. =========================================
  10. FlowLayout.LEFT
  11. FlowLayout.RIGHT
  12. FlowLayout.CENTER
  13. ======================================
  14. */
  15. import java.awt.*;
  16. import java.awt.event.*;
  17. import java.applet.*;
  18. /*
Rahimv's picture

Create Choice control and implement ItemListener

5
Your rating: None Average: 5 (1 vote)
  1. /*
  2. Choice Control:-
  3. ~~~~~~~~~~~~~~
  4.  Choice() throws java.awt.HeadlessException;
  5. Methods:-
  6. ~~~~~~~
  7.     public int getItemCount();
  8.     public int countItems();
  9.  public String getItem(int);
  10.  final String getItemImpl(int);
  11.     public void add(String);
  12.     public void addItem(String);
  13.  public void insert(String, int);
  14.     public void remove(String);
  15.     public void remove(int);
Rahimv's picture

Create Checkboxes and implement ItemListener using applet

5
Your rating: None Average: 5 (3 votes)
  1. /*
  2. CheckBox:-
  3. ~~~~~~~~~~
  4.     Checkbox();
  5.     Checkbox(String);
  6.     Checkbox(String,boolean);
  7.     Checkbox(String,boolean,CheckboxGroup);
  8.     Checkbox(String,CheckboxGroup,boolean);
  9. Medhods:-
  10.     String getLabel();
  11.     void setLabel(java.lang.String);
  12.     boolean getState();
  13.     void setState(boolean);
  14.     Object getSelectedObjects()[];
  15.     CheckboxGroup getCheckboxGroup();
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. /*
Rahimv's picture

Create an applet and four buttons and arrange them using BorderLayout

3
Your rating: None Average: 3 (1 vote)
  1. /*
  2. Layout Manager
  3. ~~~~~~~~~~~~~~
  4. BorderLayout
  5. ==========
  6. BorderLayout()
  7. BorderLayout(int horz, int vert)
  8. =========================================
  9. BorderLayout.EAST
  10. BorderLayout.WEST
  11. BorderLayout.NORTH
  12. BorderLayout.SOUTH
  13. BorderLayout.CENTER
  14. ======================================
  15. */
  16. import java.awt.*;
  17. import java.awt.event.*;
  18. import java.applet.*;
  19. /*
Syndicate content