Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-05-2008, 10:54 AM
Member
 
Join Date: Apr 2008
Posts: 2
i4gotmyid is on a distinguished road
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!!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-17-2008, 05:11 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 512
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
Sun's Java Tutorial about button may help you out....

API is also helpful....

try to use setEnabled.

regards,
sukatoa
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
java applet button problem .. :( plz help i4gotmyid New To Java 0 04-05-2008 10:55 AM
search button java applet awt perplexingtrax New To Java 2 03-24-2008 02:49 PM
Applet button not working letmeoutofhere Java Applets 9 11-14-2007 01:15 PM
applet button kazitula Java Applets 2 11-14-2007 08:25 AM
Problem with run Java Applet Albert Java Applets 1 07-13-2007 04:06 PM


All times are GMT +3. The time now is 05:33 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org