aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextArea As JRadioButton" Watch "JTextArea As JRadioButton" New topic
Author

JTextArea As JRadioButton

manos zaxaris
Greenhorn

Joined: Nov 26, 2008
Posts: 3
Hi,
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

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JTextArea As JRadioButton
 
Similar Threads
text area occupation
Swing
JTextArea doubt
Scroll Bar Movement........
Using JTextArea