新建一个myjieshao-Java文件。 创建JFrame窗体,在窗体上添加一个文本域

新建一个myjieshao-Java文件。创建JFrame窗体,在窗体上添加一个文本域在窗体上添加一个文本域JTextField,2个单选按钮JRadioButton,1... 新建一个myjieshao-Java文件。
创建JFrame窗体,在窗体上添加一个文本域在窗体上添加一个文本域JTextField,2个单选按钮JRadioButton,1个文本域JTextArea,3个按钮JButton,一个选择框Choise和一个JLable。

在线等,急……
展开
 我来答
我的爱情556
2016-12-30
知道答主
回答量:37
采纳率:0%
帮助的人:10.3万
展开全部
//我用控件生成的
package chuangkou.jiemian;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import org.dyno.visual.swing.layouts.Constraints;
import org.dyno.visual.swing.layouts.GroupLayout;
import org.dyno.visual.swing.layouts.Leading;
//VS4E -- DO NOT REMOVE THIS LINE!
public class ddd extends JFrame {
private static final long serialVersionUID = 1L;
private JLabel jLabel0;
private JTextField jTextField0;
private JComboBox jComboBox0;
private JRadioButton jRadioButton0;
private JRadioButton jRadioButton1;
private JButton jButton0;
private JButton jButton1;
private JButton jButton2;
public ddd() {
initComponents();
}
private void initComponents() {
setTitle("自己的姓名");
setLayout(new GroupLayout());
add(getJLabel0(), new Constraints(new Leading(16, 49, 10, 10), new Leading(18, 33, 10, 10)));
add(getJTextField0(), new Constraints(new Leading(60, 120, 10, 10), new Leading(23, 12, 12)));
add(getJComboBox0(), new Constraints(new Leading(192, 12, 12), new Leading(21, 12, 12)));
add(getJRadioButton0(), new Constraints(new Leading(266, 10, 10), new Leading(21, 12, 12)));
add(getJRadioButton1(), new Constraints(new Leading(310, 12, 12), new Leading(21, 12, 12)));
add(getJButton0(), new Constraints(new Leading(41, 10, 10), new Leading(159, 10, 10)));
add(getJButton1(), new Constraints(new Leading(131, 10, 10), new Leading(159, 12, 12)));
add(getJButton2(), new Constraints(new Leading(230, 12, 12), new Leading(157, 10, 10)));
setSize(377, 240);
}
private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setText("取消");
}
return jButton2;
}
private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setText("提交");
}
return jButton1;
}
private JButton getJButton0() {
if (jButton0 == null) {
jButton0 = new JButton();
jButton0.setText("重置");
}
return jButton0;
}
private JRadioButton getJRadioButton1() {
if (jRadioButton1 == null) {
jRadioButton1 = new JRadioButton();
jRadioButton1.setSelected(true);
jRadioButton1.setText("女");
}
return jRadioButton1;
}
private JRadioButton getJRadioButton0() {
if (jRadioButton0 == null) {
jRadioButton0 = new JRadioButton();
jRadioButton0.setSelected(true);
jRadioButton0.setText("男");
}
return jRadioButton0;
}
private JComboBox getJComboBox0() {
if (jComboBox0 == null) {
jComboBox0 = new JComboBox();
jComboBox0.setModel(new DefaultComboBoxModel(new Object[] { "北京", "天津", "上海", "广东" }));
jComboBox0.setDoubleBuffered(false);
jComboBox0.setBorder(null);
}
return jComboBox0;
}
private JTextField getJTextField0() {
if (jTextField0 == null) {
jTextField0 = new JTextField();
}
return jTextField0;
}
private JLabel getJLabel0() {
if (jLabel0 == null) {
jLabel0 = new JLabel();
jLabel0.setText("姓名");
}
return jLabel0;
}
}
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
匿名用户
2016-12-30
展开全部
swing 编程,,,,,

~~~~~~~~~~~~~~
追问
你会吗亲
帮忙打个源代码,谢谢
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式