JRadioButton « JTextArea « Java Swing Q&A





1. JTextArea As JRadioButton    coderanch.com

I'd be inclined to keep the radioButton and build on a textArea. something like this import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.event.*; class Testing { ButtonGroup group = new ButtonGroup(); public void buildGUI() { JRadioButtonPanel rb1 = new JRadioButtonPanel("Hello\nWorld"); JRadioButtonPanel rb2 = new JRadioButtonPanel("Goodbye\nnow"); JRadioButtonPanel rb3 = new JRadioButtonPanel("Mary had a little lamb, it's fleece was white as snow"); JFrame ...