Results 1 to 3 of 3
  1. #1
    tricky84 is offline Member
    Join Date
    May 2012
    Posts
    2
    Rep Power
    0

    Default How to launch an Applet from a User name and password Applet

    Hello to all,

    I was wondering if someone is kind enough to offer me some help. I have created a simple Java applet and a user login and password applet, Both compile and work fine individually.

    What I want is the Login applet to launch the main applet that I'm using. So at the end of my login applet I have one IF statements as follows:

    public void paint(Graphics g)

    {

    if(blnCorrect)
    g.drawString("Correct! Successful Login.", 50, 100);
    else
    g.drawString("Invalid username or password.", 50, 100);
    }
    }


    I was wondering if there is a way of launching the main applet called balderdash using the true IF statement that says successful login. I have tried the get method but to no avail. I am using blueJ as a programme.

    Any help would be greatly appreciated.

    Kent

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: How to launch an Applet from a User name and password Applet

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: How to launch an Applet from a User name and password Applet

    Have the main JApplet open a JOptionPane that holds a JPanel with your a JTextField and a JPasswordField and have the user sign in with the JOptionPane. After the option pane closes, check the contents of the text/password fields and then have your applet change its behavior depending on these results.

Similar Threads

  1. Java applet and oracle id password
    By poajavaweb in forum Java Applets
    Replies: 0
    Last Post: 12-16-2010, 05:47 PM
  2. using applet with user-craeted methods
    By munchflo in forum JCreator
    Replies: 0
    Last Post: 11-16-2008, 06:12 AM
  3. how applet is sent to user's machine
    By amu in forum Java Applets
    Replies: 1
    Last Post: 09-21-2008, 02:24 PM
  4. Replies: 0
    Last Post: 03-31-2008, 04:35 PM
  5. Viewing a user's periphials from an applet
    By jason2li in forum Java Applets
    Replies: 0
    Last Post: 08-07-2007, 02:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •