aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Lotto generation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Lotto generation" Watch "Lotto generation" New topic
Author

Lotto generation

Alan Green
Greenhorn

Joined: Sep 07, 2003
Posts: 17
I am having trouble with my action command. I am trying to use get.Source to activate the generation of the numbers when i hit play. Is there an easy way of doing this. Thanx..

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Why do you keep asking Swing questions in other forums besides the Swing forum?
I moving this thread to Swing. Please pay close attention to what forums you are posting questions in. You will get faster, better help by doing so.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I asked if you would change your display name to conform to our Naming Polciy. Although you did change your display name, it still does no comply with our naming policy.
In case it is not clear enough in the link I provided, you have to use a First Name Last name combination. See my display name for an example.
Members who fail to comply with this rule risk having their account disabled. Consider this your last warning.
As soon as you have complied I will be more than happy to help you with your problem.
I hope that you understand, this is for the benefit of the entire Javaranch website. We are not picking on you. I hope that you will comply soon. This is a wonderful place to learn Java and meet with other professionals around the world.
Alan Green
Greenhorn

Joined: Sep 07, 2003
Posts: 17
no problem
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Thanks for changing your name!!
As to your question. event returns an object. In your case, that object would be a JButton more than likely. So what you need to do is possibly something like...

or you could do

Either way, you are going to need to make your playButton public for this class so it can be used in your actionPerformed method.
Hope that helps.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Lotto generation