这是我自己写的一个测试程序,要求在点击“提交”按钮时,在监听事件中获取单选按钮的值,和复选框的值packagehelloworld;importjava.awt.*;importjavax.swing.*;importcom.borland.j...
这是我自己写的一个测试程序,要求在点击“提交”按钮时,在监听事件中获取单选按钮的值,和复选框的值
package helloworld;
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Frame1 extends JFrame {
XYLayout xYLayout1 = new XYLayout();
JLabel jLabel1 = new JLabel();
JRadioButton jRadioButton1 = new JRadioButton();
JRadioButton jRadioButton2 = new JRadioButton();
JButton jButton1 = new JButton();
JLabel jLabel2 = new JLabel();
JCheckBox jCheckBox1 = new JCheckBox();
JCheckBox jCheckBox2 = new JCheckBox()