求一个JAVA界面 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 帮楼主贴下图吧http://i53.tinypic.com/21o3kif.png 刚好有个差不多的,改了下发上来,细节自己改import java.awt.*;import javax.swing.*;public class jframe { JButton btn1 = new JButton("交卷"); JButton btn2 = new JButton("上一题"); JButton btn3 = new JButton("下一题"); JButton btn4 = new JButton("确认"); JLabel lab1 = new JLabel("考生姓名: "); JLabel lab2 = new JLabel("某某某 "); JLabel lab3 = new JLabel("距考试结束还有: "); JLabel lab4 = new JLabel("**:**:**"); JTextArea textArea = new JTextArea(10,50); JPanel northPanel = new JPanel(); JPanel centerPanel = new JPanel(); JPanel southPanel = new JPanel(); JPanel fatherPanel =new JPanel(); JFrame frame =new JFrame(); JRadioButton[] teams = new JRadioButton[4]; ButtonGroup group =new ButtonGroup(); public jframe(){ frame.setTitle("查询"); frame.setBounds(300, 150,800,300); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setResizable(false); frame.setVisible(true); teams[0] = new JRadioButton("A"); teams[1] = new JRadioButton("B"); teams[2] = new JRadioButton("B"); teams[3] = new JRadioButton("B"); for(int i=0;i<teams.length;i++) { group.add(teams[i]); southPanel.add(teams[i]); } northPanel.add(lab1); northPanel.add(lab2); northPanel.add(lab3); northPanel.add(lab4); northPanel.add(btn1); centerPanel.add(textArea); southPanel.add(btn2); southPanel.add(btn3); southPanel.add(btn4); fatherPanel.add(northPanel,BorderLayout.NORTH); fatherPanel.add(centerPanel,BorderLayout.CENTER); fatherPanel.add(southPanel,BorderLayout.SOUTH); frame.add(fatherPanel); } public static void main(String[] arguments){ jframe s=new jframe(); }} JFrame下的一个BorderLayout布局North:JPanel的默认布局,含两个JLabel、两个JTextField、一个JButton;后一个JTextField内放置一个时钟,可以用定时器解决。Center:BorderLayout布局,Center为一个JTextArea,South为4个JCheckBox;South:JPanel的默认布局,含3个JButton类实现ActionListener接口,4个JButton的注册监听到类的ActionPerformed方法上。 真的都是好久没写了 楼主 myeclipse 里面有swing的插件 你试试 直接拖拽 类似VB 很强大的 解析xml的一个问题 java初学,随机产生26字母报错,怎么回事?可能损失精度? 大家说我现在应该学点什么好。。 奇怪的问题 think in java(三) 反射技术的光芒好强 求解决方法 j2se,j2ee,j2me,jms各是什么用途,开发工具是什么,在哪儿在载 向高手求救,有关java中文的问题!!! 百思不得其解:Java为什么就不能用来开发呼叫中心,CTI以及语音合成方面的软件?这太不可思议了。请快进入!!! JAVA 多线程应用于Applet 关于getAppletContext().showDocument(url)的问题
http://i53.tinypic.com/21o3kif.png
import java.awt.*;
import javax.swing.*;
public class jframe {
JButton btn1 = new JButton("交卷");
JButton btn2 = new JButton("上一题");
JButton btn3 = new JButton("下一题");
JButton btn4 = new JButton("确认");
JLabel lab1 = new JLabel("考生姓名: ");
JLabel lab2 = new JLabel("某某某 ");
JLabel lab3 = new JLabel("距考试结束还有: ");
JLabel lab4 = new JLabel("**:**:**");
JTextArea textArea = new JTextArea(10,50);
JPanel northPanel = new JPanel();
JPanel centerPanel = new JPanel();
JPanel southPanel = new JPanel();
JPanel fatherPanel =new JPanel();
JFrame frame =new JFrame();
JRadioButton[] teams = new JRadioButton[4];
ButtonGroup group =new ButtonGroup();
public jframe(){
frame.setTitle("查询");
frame.setBounds(300, 150,800,300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(false);
frame.setVisible(true);
teams[0] = new JRadioButton("A");
teams[1] = new JRadioButton("B");
teams[2] = new JRadioButton("B");
teams[3] = new JRadioButton("B");
for(int i=0;i<teams.length;i++)
{
group.add(teams[i]);
southPanel.add(teams[i]);
}
northPanel.add(lab1);
northPanel.add(lab2);
northPanel.add(lab3);
northPanel.add(lab4);
northPanel.add(btn1);
centerPanel.add(textArea);
southPanel.add(btn2);
southPanel.add(btn3);
southPanel.add(btn4);
fatherPanel.add(northPanel,BorderLayout.NORTH);
fatherPanel.add(centerPanel,BorderLayout.CENTER);
fatherPanel.add(southPanel,BorderLayout.SOUTH);
frame.add(fatherPanel);
}
public static void main(String[] arguments){
jframe s=new jframe();
}
}
North:JPanel的默认布局,含两个JLabel、两个JTextField、一个JButton;
后一个JTextField内放置一个时钟,可以用定时器解决。
Center:BorderLayout布局,Center为一个JTextArea,South为4个JCheckBox;
South:JPanel的默认布局,含3个JButton类实现ActionListener接口,4个JButton的注册监听到类的ActionPerformed方法上。