java中页面布局问题
来源:百度知道 编辑:UC知道 时间:2024/09/12 22:07:19
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Checkbox;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class Test extends JFrame implements ActionListener
{
/**
*
*/
private static final long serialVersionUID = 1L;
Checkbox checkbox1;
Checkbox checkbox2;
Checkbox checkbox3;
Button button;
public Test()
{
this.setBounds(200,60,700,500);
this.setTitle("中国考试模式版");
Container container=this.getContentPane();
container.setLayout(new BorderLayout());
//板块上面部分
JPanel panelNorth=new JPanel(new FlowLayout());
SimpleDateFormat dateFormat=new Simpl
import java.awt.Button;
import java.awt.Checkbox;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class Test extends JFrame implements ActionListener
{
/**
*
*/
private static final long serialVersionUID = 1L;
Checkbox checkbox1;
Checkbox checkbox2;
Checkbox checkbox3;
Button button;
public Test()
{
this.setBounds(200,60,700,500);
this.setTitle("中国考试模式版");
Container container=this.getContentPane();
container.setLayout(new BorderLayout());
//板块上面部分
JPanel panelNorth=new JPanel(new FlowLayout());
SimpleDateFormat dateFormat=new Simpl
看你上面的代码,应该是都有显示。
就只有9个JLabel。
你加的控件在你的Jpanel里边在布局一次。具体怎么布局找资料。。
是不是没有设置面板的大小啊!