|
-
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
Similar Threads
-
Replies: 14
Last Post: 04-19-2006, 09:54 PM
-
Replies: 2
Last Post: 07-19-2005, 06:09 AM
-
By DrunkinP in forum Java
Replies: 0
Last Post: 03-31-2005, 09:36 AM
-
Replies: 0
Last Post: 02-16-2005, 12:30 PM
-
By Michael Tzoanos in forum Database
Replies: 5
Last Post: 08-09-2002, 01:07 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks