Click here to Skip to main content
15,886,724 members
Home / Discussions / Java
   

Java

 
QuestionRadio Button Selected Pin
MallardsReach25-Mar-20 9:50
MallardsReach25-Mar-20 9:50 
QuestionRe: Radio Button Selected Pin
ZurdoDev25-Mar-20 10:10
professionalZurdoDev25-Mar-20 10:10 
AnswerRe: Radio Button Selected Pin
MallardsReach25-Mar-20 10:33
MallardsReach25-Mar-20 10:33 
QuestionRe: Radio Button Selected Pin
ZurdoDev25-Mar-20 10:39
professionalZurdoDev25-Mar-20 10:39 
AnswerRe: Radio Button Selected Pin
MallardsReach25-Mar-20 11:11
MallardsReach25-Mar-20 11:11 
QuestionRe: Radio Button Selected Pin
ZurdoDev25-Mar-20 12:19
professionalZurdoDev25-Mar-20 12:19 
AnswerRe: Radio Button Selected Pin
Richard MacCutchan26-Mar-20 0:16
mveRichard MacCutchan26-Mar-20 0:16 
GeneralRe: Radio Button Selected Pin
MallardsReach26-Mar-20 0:28
MallardsReach26-Mar-20 0:28 
Thanks Richard
I have and do look at the Java Tutorials but don't always find them helpful even though they explain the concepts of components.
I did eventually figure it out, the code is below for anyone else to look through,
Java
ItemListener itemListener = new ItemListener() {
    public void itemStateChanged(ItemEvent itemEvent) {
        AbstractButton aButton = (AbstractButton)itemEvent.getSource();
            int state = itemEvent.getStateChange();
            String name = aButton.getText();
        for (int i = 1; i < rbTable.length; i++)
        {
            if (state == ItemEvent.SELECTED) {
                if (name.equals(rbTable[i].getText())) {
                    userText.setText(rbTable[i].getText());
                }

            }
        }
    }
};

GeneralRe: Radio Button Selected Pin
Richard MacCutchan26-Mar-20 0:36
mveRichard MacCutchan26-Mar-20 0:36 
GeneralRe: Radio Button Selected Pin
MallardsReach26-Mar-20 2:55
MallardsReach26-Mar-20 2:55 
GeneralRe: Radio Button Selected Pin
MallardsReach26-Mar-20 4:15
MallardsReach26-Mar-20 4:15 
QuestionUser defined Method Pin
MallardsReach24-Mar-20 2:56
MallardsReach24-Mar-20 2:56 
AnswerRe: User defined Method Pin
Richard MacCutchan24-Mar-20 4:18
mveRichard MacCutchan24-Mar-20 4:18 
GeneralRe: User defined Method Pin
MallardsReach24-Mar-20 7:39
MallardsReach24-Mar-20 7:39 
GeneralRe: User defined Method Pin
Richard MacCutchan24-Mar-20 7:44
mveRichard MacCutchan24-Mar-20 7:44 
GeneralRe: User defined Method Pin
MallardsReach24-Mar-20 8:29
MallardsReach24-Mar-20 8:29 
GeneralRe: User defined Method Pin
Richard MacCutchan24-Mar-20 10:16
mveRichard MacCutchan24-Mar-20 10:16 
GeneralRe: User defined Method Pin
MallardsReach24-Mar-20 22:17
MallardsReach24-Mar-20 22:17 
QuestionJTextArea Pin
MallardsReach23-Mar-20 0:48
MallardsReach23-Mar-20 0:48 
AnswerRe: JTextArea Pin
Richard MacCutchan23-Mar-20 0:54
mveRichard MacCutchan23-Mar-20 0:54 
QuestionCalling a Method at run time Pin
MallardsReach21-Mar-20 22:32
MallardsReach21-Mar-20 22:32 
AnswerRe: Calling a Method at run time Pin
Richard MacCutchan21-Mar-20 23:29
mveRichard MacCutchan21-Mar-20 23:29 
GeneralRe: Calling a Method at run time Pin
MallardsReach22-Mar-20 0:38
MallardsReach22-Mar-20 0:38 
GeneralRe: Calling a Method at run time Pin
Richard MacCutchan22-Mar-20 0:48
mveRichard MacCutchan22-Mar-20 0:48 
GeneralRe: Calling a Method at run time Pin
MallardsReach22-Mar-20 1:08
MallardsReach22-Mar-20 1:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.