JSplitPane

JSplitPane



package com.maxenmed.monitersever.mainframe;

import javax.swing.*;
import javax.swing.plaf.metal.*;
import ch.randelshofer.quaqua.QuaquaManager;
import java.awt.*;
import java.awt.event.*;

/**
 * @ClassName: MainFrame
 * @Description: TODO(监护仪云服务器主界面)
 * @author 张洪波
 * @date 2011-8-29 上午09:28:05
 * 
 */


public class MainFrame extends JFrame
{
	JSplitPane splitpane_123_456;
	JSplitPane splitpane_1_23;
	JSplitPane splitpane_4_56;
	JSplitPane splitpane_2_3;
	JSplitPane splitpane_5_6;
	int SCREENWITH = 1920;
	int SCREENHEIGHT = 1080;

	MainFrame()
	{

		initComponents();
		setExtendedState(Frame.MAXIMIZED_BOTH);
		setVisible(true);
		Container con = getContentPane();
		con.add(splitpane_123_456);
		this.setBounds(0, 0, 1920, 1080);
		validate();
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	
	/**
	 * 〈初始化框架〉
	 * 〈设置主题和框架划分〉
	 * @return  [void]
	 * @exception/throws [Exception] [主题包不存在等原因]
	 * @since [1.0]
	 * @deprecated
	 */
	private void initComponents()
	{
		
		try
		{
			System.setProperty("Quaqua.TabbedPane.design", "jaguar");
			String lafClassName = QuaquaManager.getLookAndFeelClassName();
			UIManager.setLookAndFeel(lafClassName);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		JButton label1 = new JButton("1");
		JButton label2 = new JButton("2");
		JButton label3 = new JButton("3");
		JButton label4 = new JButton("4");
		JButton label5 = new JButton("5");
		JButton label6 = new JButton("6");
		splitpane_2_3 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, false,label2,label3);
		splitpane_5_6 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, false,label5,label6);
		splitpane_1_23 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, false,label1,splitpane_2_3);
		splitpane_4_56 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, false,label4,splitpane_5_6);
		splitpane_123_456 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, false,splitpane_1_23,splitpane_4_56);
		splitpane_123_456.setDividerLocation(SCREENWITH/2);
		splitpane_2_3.setDividerLocation(SCREENHEIGHT*7/10);
		splitpane_5_6.setDividerLocation(SCREENHEIGHT*7/10);
		splitpane_1_23.setDividerLocation(SCREENWITH/10);
		splitpane_4_56.setDividerLocation(SCREENWITH/10);
	}
	public static void main(String[] agrgs)
	{
		new MainFrame();
	}
}


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值