File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JTextArea As JRadioButton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextArea As JRadioButton" Watch "JTextArea As JRadioButton" New topic

JTextArea As JRadioButton

manos zaxaris

Joined: Nov 26, 2008
Posts: 3
its my first question! I dont speak very good english but anyway.
I want your help to solve my problem...
I would like to make 3 JTextAreas to work as JRadioButtons. I will make a multiple choice Test. I take data from a database and the student must select the correct Answer. I have input the Texts from database to three JTextArea and i want to change background color to selected TextArea and if the student change his choice, to another answer-textarea this textarea.backgroundColor to change . Basic i want to execute some expressions if the student press any JTextArea. What needs?
I dont know if you understand me, but if yes, you will solve me one big problem. Thanks.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
I'd be inclined to keep the radioButton and build on a textArea.

something like this

I agree. Here's the link:
subject: JTextArea As JRadioButton
It's not a secret anymore!