Results 1 to 7 of 7
Thread: Radial buttons and IFs
- 04-23-2012, 09:04 PM #1
Member
- Join Date
- Apr 2012
- Posts
- 2
- Rep Power
- 0
Radial buttons and IFs
Hi!
My problem is next. I have two groups of buttons, let's name them A and B. A group consists of 2 buttons, and B group consists of 4 buttons. What I need is next:
I need
if (A1 is selected && B2 is selected)
write_something_in_my_text_field_after_the_common( not radial)button_is_pressed;
I did lot of Googleing, every site says different. Furthermore, I'm completely new in this, so I ask you guys, what part of code should I implement and how does the syntax look like.
Thanks!
- 04-23-2012, 10:18 PM #2
AN21XX
- Join Date
- Mar 2012
- Location
- Munich
- Posts
- 297
- Rep Power
- 2
Re: Radial buttons and IFs
I hate sounding like an idiot, but what is a radial button?
- 04-23-2012, 10:19 PM #3
Re: Radial buttons and IFs
What class are your buttons? Does that class have any methods you could use for testing the state of the buttons?
If you don't understand my response, don't ignore it, ask a question.
- 04-24-2012, 05:41 AM #4
Re: Radial buttons and IFs
Since you're completely new, read the API for any of the button classes and follow the link to the Swing tutorial from there.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 04-24-2012, 05:57 PM #5
Member
- Join Date
- Apr 2012
- Posts
- 2
- Rep Power
- 0
- 04-24-2012, 05:58 PM #6
Re: Radial buttons and IFs
Look in the API doc for all the methods in the class and the inherited methods also.JButton. I need a method
Java Platform SE 6If you don't understand my response, don't ignore it, ask a question.
-
Re: Radial buttons and IFs
Are you sure about this? JButtons don't get "checked" while JCheckBox and JRadioButton (which is what I *think* you mean) do, as does a JToggleButton in a matter of speaking. Not to sound harpy, but please be as precise as possible when describing your problem. Learning to program is difficult, and helping others do this is even harder, hard enough that if you're asking questions you should strive to make it as easy as possible for us to help you and to avoid this type of confusion.
Similar Threads
-
Detecting buttons
By jsobel in forum AWT / SwingReplies: 2Last Post: 04-06-2012, 05:52 PM -
Help with Buttons
By wld4ubabay in forum New To JavaReplies: 20Last Post: 05-17-2010, 08:13 AM -
Where To Get Pop Up Buttons
By hitmen in forum AWT / SwingReplies: 7Last Post: 03-26-2009, 04:05 AM -
SWT Radial Layout Demo
By Java Tip in forum SWTReplies: 0Last Post: 07-11-2008, 04:51 PM -
How to use SWT Buttons
By Java Tip in forum SWTReplies: 0Last Post: 07-11-2008, 04:44 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks