how get radiobutton index in textfield

Hi master

Sir this is my class i am using the radio button and textfield

===============

public class radio extends javax.swing.JApplet {

public void init() {

initComponents();

buttonGroup1.add(jRadioButton1);

buttonGroup1.add(jRadioButton2);

buttonGroup1.add(jRadioButton3);

}

private void initComponents() {

buttonGroup1 = new javax.swing.ButtonGroup();

jRadioButton1 = new javax.swing.JRadioButton();

jRadioButton2 = new javax.swing.JRadioButton();

jRadioButton3 = new javax.swing.JRadioButton();

jTextField1 = new javax.swing.JTextField();

jTextField2 = new javax.swing.JTextField();

getContentPane().setLayout(null);

jRadioButton1.setText("jRadioButton1");

getContentPane().add(jRadioButton1);

jRadioButton1.setBounds(140, 30, 104, 24);

jRadioButton2.setText("jRadioButton2");

getContentPane().add(jRadioButton2);

jRadioButton2.setBounds(150, 60, 104, 24);

jRadioButton3.setText("jRadioButton3");

getContentPane().add(jRadioButton3);

jRadioButton3.setBounds(170, 90, 104, 24);

jTextField1.setText("jTextField1");

getContentPane().add(jTextField1);

jTextField1.setBounds(100, 180, 150, 20);

jTextField2.setText("jTextField2");

getContentPane().add(jTextField2);

jTextField2.setBounds(100, 140, 140, 30);

}

// Variables declaration - do not modify

private javax.swing.ButtonGroup buttonGroup1;

private javax.swing.JRadioButton jRadioButton1;

private javax.swing.JRadioButton jRadioButton2;

private javax.swing.JRadioButton jRadioButton3;

private javax.swing.JTextField jTextField1;

private javax.swing.JTextField jTextField2;

// End of variables declaration

}

=======================================================================

Sir my need is when user select any one radio button then

radioButton index move replace in textfield1 and radioButton title move in textfield2

because i save the radiobutton index in database

and when form start then which button true that value received 1 form database

please give me idea how I control my program

thank

aamir

[2272 byte] By [mfa786a] at [2007-11-26 15:01:50]
# 1
This is now the 6th time I've asked you to learn how to use the "Code" formatting tags. You refuse to learn how to use the forum effectively, so I refuse to answer.
camickra at 2007-7-8 8:50:52 > top of Java-index,Desktop,Core GUI APIs...