I need to make several buttons that would change from red to green and back again. Can anyone give me some ideas on how to do this?
Thanks!
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
I need to make several buttons that would change from red to green and back again. Can anyone give me some ideas on how to do this?
Thanks!
What have you tried? The JButton class has several set methods that could do it.
I have actully just installed the JDK software so I am starting from gound zero. I was hoping to get a nudge in the right direction. I have what I want to do in my head and I'm hoping its easy enough to do for a begginer. I also installed NetBeans. How would you do it?
You need to get familiar with the API doc for the Java classes. Here is link:
Java Platform SE 6
I'd read the API doc for the class I was working with and find a method or methods that look like they would do what I wanted and try them to see what they did.How would you do it?