Results 1 to 2 of 2
  1. #1
    i4gotmyid is offline Member
    Join Date
    Apr 2008
    Posts
    2
    Rep Power
    0

    Default java applet button problem .. :( plz help!

    my game applet starts with 2 push buttons START GAME and
    VIEW SCORES

    1.a thread starts when "START GAME" button is pressed.

    >>

    if(str.equals("START"))
    {
    t1=new Thread(this);
    t1.start();
    }

    but the problm is that the "START GAME" button still appears in the screen while the game is running ..
    how can i make it such a way tht the button dissapears after it is cliked ?

    2. How is it possible to run 2 differnt threads(havin differen RUN body) in a program ?
    I need a different thread for the View Score section ..
    But once the run function for 1st thread is made , wer wil the other thread's run function be written ?

    3. How can the Buttons be placed in a coordinate x,y ?
    i tried using button.setLocation(int x,int y) but it seems to be not working
    and how can i increase size of button

    my class extends Applet class, implements Runnable and ActionListener

    help!!

  2. #2
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    Sun's Java Tutorial about button may help you out....

    API is also helpful....

    try to use setEnabled.

    regards,
    sukatoa

Similar Threads

  1. java applet button problem .. :( plz help
    By i4gotmyid in forum New To Java
    Replies: 0
    Last Post: 04-05-2008, 10:55 AM
  2. search button java applet awt
    By perplexingtrax in forum New To Java
    Replies: 2
    Last Post: 03-24-2008, 02:49 PM
  3. Applet button not working
    By letmeoutofhere in forum Java Applets
    Replies: 9
    Last Post: 11-14-2007, 01:15 PM
  4. applet button
    By kazitula in forum Java Applets
    Replies: 2
    Last Post: 11-14-2007, 08:25 AM
  5. Problem with run Java Applet
    By Albert in forum Java Applets
    Replies: 1
    Last Post: 07-13-2007, 04:06 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
  •