Bookmark Topic Watch Topic
  • New Topic

JCheckBox and JRadioButton

 
Berkant Ozer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi guys,

When JOptionPane shows the results, I always get "TRUE" and "FALSE" not their names

I think I need to use method getSelectedItem().toString() to get the value of JCheckbox or JRadioButton.

any help you can give me would be appreciated.

 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4518
281
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
Berkant, Please UseAMeaningfulSubjectLine instead of something like "Need Help" when you post a question.
Please edit your post to add a meaningful subject line by clicking the button.
 
Jonas Isberg
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Report post to moderator
It would probably be easier to understand the problem if you could reduce your code to
its simplest form that still has the current problem. I don't know which variable(s) that is
the offending one(s), nor the exact type and I cannot try to run it on my own, I could
offer the follow links though. :-)

HowToAskQuestionsOnJavaRanch
smart-questions
 
Berkant Ozer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
It's my first time here.

The problem is:
when the user selects GPS at the optional part and then clicks the submit button, the part of "optinal" comes with saying "TRUE FALSE".
I don't know how JCheckBox and JRadioButton come their name that are selected by users
 
Rob Camick
Ranch Hand
Posts: 2600
9
  • Mark post as helpful
  • send pies
  • Report post to moderator
I don't know how JCheckBox and JRadioButton come their name that are selected by users




If you need more hep you should create a SSCCE, that demonstrates the incorrect behaviour.
 
Rob Spoor
Sheriff
Pie
Posts: 20555
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Rob Camick wrote:SSCCE

Pssst. Since the last deployment You no longer need to create a link manually. Just type in SSCCE and it becomes a link automatically!
Since we often point to that site from this forum I asked it to be added to the auto-link list.
 
Berkant Ozer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
I want to delete this thread. How can I do that?

 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4518
281
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
Why do you need to delete it?
 
Maneesh Godbole
Saloon Keeper
Posts: 11071
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
You can't.
Even if you did, why would you want to do that?

Damn. Devaka beat me to it
 
Berkant Ozer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
because I didn't get any help. I've done it by myseld
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Report post to moderator
> because I didn't get any help. I've done it by myself

instead of asking for deletion, what about being a good sport and posting your solution,
so that anyone else with a similar problem wouldn't need to 'ask' for help, they'd be
able to find it here.
 
    Bookmark Topic Watch Topic
  • New Topic