swing applet help


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: swing applet help

  1. #1
    Join Date
    Jun 2006
    Posts
    6

    swing applet help

    trying to create a swing applet that will display a form for creating an email directory, dont know if the code was writting correctly


    Code:
    import java.awt.*:
    public class JEmailForm extends java.applet.Applet
    {
      Label firstnameLabel= new Label ("First Name:");
      TextFied textfield = new TextField (25);
      Label lastnameLable = new Lable("Last Name:");
      TextField lastname = new TextField (25);
      Label emailLabel = new Lable("Email:");
      TextField email = new TextField (25);
      Jbutton entVal = new Jbutton ("submit");
      
      public void init() {
        add (firstnameLabel);
        add (firstname);
        add (lastnameLabel);
        add (lastname);
        add (emailLabel);
        email.setEchoCharacter ('*');
        add (email);
        add (jbutton);
      }
    }

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    So far so good, except for "Lable"

    Then you will have to add actionlistener for the button and a way to handle the email directory creation; That task will be very difficult if you run this as an applet in a browser, - the security manager will not allow it. To do this you will have to implement it as an application.
    eschew obfuscation

Similar Threads

  1. Running Swing Applet in html page
    By Bo Shim in forum Java
    Replies: 3
    Last Post: 03-27-2008, 07:56 AM
  2. swing applet programming HELP!!!
    By sc_3007 in forum Java
    Replies: 3
    Last Post: 07-06-2006, 04:18 PM
  3. Replies: 2
    Last Post: 02-25-2006, 12:01 AM
  4. Replies: 3
    Last Post: 08-23-2001, 12:01 PM
  5. Can't load Swing Applet in a browser
    By Satish Pamidimarthi in forum Java
    Replies: 2
    Last Post: 08-22-2000, 07:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center