当前位置: 首页>>代码示例>>Java>>正文


Java Box.createVerticalBox方法代码示例

本文整理汇总了Java中javax.swing.Box.createVerticalBox方法的典型用法代码示例。如果您正苦于以下问题:Java Box.createVerticalBox方法的具体用法?Java Box.createVerticalBox怎么用?Java Box.createVerticalBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.Box的用法示例。


在下文中一共展示了Box.createVerticalBox方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createUnivariate

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * Sets up univariate statistics panel
 */
private void createUnivariate() {
	Box mainBox = Box.createVerticalBox();
	Box centralBox = Box.createHorizontalBox();
	mainBox.add(Box.createVerticalStrut(10));
	mainBox.add(centralBox);
	mainBox.add(Box.createVerticalStrut(10));

	uniStatsPanel.add(mainBox);

	// Pannello dei componenti univariate statistics panel
	JPanel componentsPanel = new JPanel(new BorderLayout(0, 5));

	// Aggiuna label descrizione
	componentsPanel.add(new JLabel(UNIV_DESCRITPION), BorderLayout.NORTH);
	componentsPanel.add(transfGraphCreate(), BorderLayout.SOUTH);
	componentsPanel.add(getScrollPaneTable(), BorderLayout.CENTER);

	// Aggiuna pannello dei componenti al tabbed pane univariate
	centralBox.add(componentsPanel);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:24,代码来源:StatsPanel.java

示例2: getObject

import javax.swing.Box; //导入方法依赖的package包/类
protected JPanel getObject() {
    Box vBox = Box.createVerticalBox();
    vBox.add(new JButton("button"));
    vBox.add(Box.createVerticalStrut(10));
    vBox.add(new JLabel("label"));
    vBox.add(Box.createVerticalGlue());
    vBox.add(new JButton("button"));
    vBox.add(Box.createVerticalStrut(10));
    vBox.add(new JLabel("label"));

    Box hBox = Box.createHorizontalBox();
    hBox.add(new JButton("button"));
    hBox.add(Box.createHorizontalStrut(10));
    hBox.add(new JLabel("label"));
    hBox.add(Box.createHorizontalGlue());
    hBox.add(new JButton("button"));
    hBox.add(Box.createHorizontalStrut(10));
    hBox.add(new JLabel("label"));

    JPanel panel = new JPanel();
    panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
    panel.add(vBox);
    panel.add(Box.createGlue());
    panel.add(hBox);
    return panel;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:27,代码来源:Test4903007.java

示例3: initComponents

import javax.swing.Box; //导入方法依赖的package包/类
private void initComponents() {
	Box vBox = Box.createVerticalBox();
	Box hBox = Box.createHorizontalBox();
	synView = new JTextPane();
	synView.setContentType("text/html");
	synView.setEditable(false);
	synScroll = new JScrollPane(synView);
	synScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	synScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
	vBox.add(Box.createVerticalStrut(30));
	vBox.add(hBox);
	vBox.add(Box.createVerticalStrut(30));
	hBox.add(Box.createHorizontalStrut(20));
	hBox.add(synScroll);
	hBox.add(Box.createHorizontalStrut(20));
	this.setLayout(new GridLayout(1, 1));
	this.add(vBox);
	synView
			.setText("<html><body><center><font face=\"bold\" size=\"3\">Saturation Sectors will be here displayed once you solve the model.</font></center></body></html>");
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:21,代码来源:SectorsTextualPanel.java

示例4: createBivariate

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * Sets up bivariate statistics panel
 */
private void createBivariate() {
	Box mainBox = Box.createVerticalBox();
	Box centralBox = Box.createVerticalBox();
	mainBox.add(Box.createVerticalStrut(10));
	mainBox.add(centralBox);
	mainBox.add(Box.createVerticalStrut(10));

	bivStatsPanel.add(mainBox);
	JPanel mainPanel = new JPanel(new BorderLayout(0, 20));
	centralBox.add(mainPanel);
	mainPanel.add(new JLabel(BIVARIATE_DESCRIPTION), BorderLayout.NORTH);
	tableBivariate = new JWatBivariateStatsTable();
	modelBivariate = new JWatBivariateStatsTableModel(model.getMatrix());
	tableBivariate.setModel(modelBivariate);
	panelBiv = new ScrollBivariatePanel(tableBivariate);
	mainPanel.add(panelBiv, BorderLayout.CENTER);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:21,代码来源:StatsPanel.java

示例5: initComponents

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * Set up the panel contents and layout
 */
private void initComponents() {

	stTable = new STTable();

	/* and now some Box black magic */

	Box hBox = Box.createHorizontalBox();
	hBox.add(Box.createHorizontalStrut(20));
	//Horizontal box containing Description label and buttons
	Box descrBox = Box.createVerticalBox();
	descrBox.add(new JLabel(DESCRIPTION_SERVICEDEMANDS));
	descrBox.add(Box.createHorizontalStrut(10));
	descrBox.add(new JButton(SWITCH_TO_ST_V));
	descrBox.setPreferredSize(new Dimension(220, 1000));
	descrBox.setMinimumSize(new Dimension(200, 200));

	hBox.add(descrBox);
	hBox.add(Box.createHorizontalStrut(10));
	JScrollPane visitTablePane = new JScrollPane(stTable);
	visitTablePane.setPreferredSize(new Dimension(1000, 1000));
	visitTablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
	visitTablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	hBox.add(visitTablePane);
	hBox.add(Box.createHorizontalStrut(20));

	Box totalBox = Box.createVerticalBox();
	totalBox.add(Box.createVerticalStrut(30));
	totalBox.add(hBox);
	totalBox.add(Box.createVerticalStrut(30));

	setLayout(new BorderLayout());
	add(totalBox, BorderLayout.CENTER);

}
 
开发者ID:max6cn,项目名称:jmt,代码行数:38,代码来源:ServiceDemandsPanel.java

示例6: initComponents

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * Set up the panel contents and layout
 */
private void initComponents() {

	stTable = new STTable();

	Box hBox = Box.createHorizontalBox();
	hBox.add(Box.createHorizontalStrut(20));
	//Horizontal box containing Description label and buttons
	Box descrBox = Box.createVerticalBox();
	descrBox.add(new JLabel(DESCRIPTION_SERVICETIMES));
	descrBox.add(Box.createHorizontalStrut(10));
	descrBox.add(new JButton(SWITCH_TO_SD));
	descrBox.setPreferredSize(new Dimension(220, 1000));
	descrBox.setMinimumSize(new Dimension(200, 200));

	hBox.add(descrBox);
	hBox.add(Box.createHorizontalStrut(10));
	JScrollPane visitTablePane = new JScrollPane(stTable);
	visitTablePane.setPreferredSize(new Dimension(1000, 1000));
	visitTablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
	visitTablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	hBox.add(visitTablePane);
	hBox.add(Box.createHorizontalStrut(20));

	Box totalBox = Box.createVerticalBox();
	totalBox.add(Box.createVerticalStrut(30));
	totalBox.add(hBox);
	totalBox.add(Box.createVerticalStrut(30));

	setLayout(new BorderLayout());
	add(totalBox, BorderLayout.CENTER);

}
 
开发者ID:max6cn,项目名称:jmt,代码行数:36,代码来源:ServiceTimesPanel.java

示例7: createTypesPanel

import javax.swing.Box; //导入方法依赖的package包/类
Box createTypesPanel() {
	Box box = Box.createVerticalBox();
	box.setOpaque(false);
	box.setBorder(new EmptyBorder(10, 0, 0, 10));

	Box b0 = Box.createHorizontalBox();
	b0.add(new JLabel(getString("LBL_FILE_TYPES")));
	b0.setBorder(new EmptyBorder(0, 0, 10, 0));
	b0.add(Box.createHorizontalGlue());
	box.add(b0);

	txtArea = new JTextArea();
	txtArea.setWrapStyleWord(true);
	txtArea.setLineWrap(true);

	JScrollPane jsp = new JScrollPane(txtArea);
	jsp.setPreferredSize(new Dimension(10, 10));

	box.add(jsp);

	Box b = Box.createHorizontalBox();
	b.add(Box.createHorizontalGlue());

	defaults = new JButton(getString("LBL_DEFAULTS"));
	defaults.addActionListener(this);
	defaults.setName("LBL_DEFAULTS");

	b.add(defaults);
	b.setBorder(new EmptyBorder(5, 0, 5, 0));
	box.add(b);

	return box;
}
 
开发者ID:kmarius,项目名称:xdman,代码行数:34,代码来源:ConfigDialog.java

示例8: makeButtons

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * @return the button panel
 */
@Override
protected JComponent makeButtons() {
	help = new HoverHelp();
	helpLabel = help.getHelpLabel();

	helpLabel.setBorder(BorderFactory.createEtchedBorder());
	//helpLabel.setHorizontalAlignment(SwingConstants.CENTER);

	ACTION_FINISH.putValue(Action.NAME, "Solve");
	ACTION_CANCEL.putValue(Action.NAME, "Exit");

	JPanel buttons = new JPanel();

	JButton button_finish = new JButton(ACTION_FINISH);
	help.addHelp(button_finish, "Validates the system and starts the solver");
	JButton button_cancel = new JButton(ACTION_CANCEL);
	help.addHelp(button_cancel, "Exits the wizard discarding all changes");
	JButton button_next = new JButton(ACTION_NEXT);
	help.addHelp(button_next, "Moves on to the next step");
	JButton button_previous = new JButton(ACTION_PREV);
	help.addHelp(button_previous, "Goes back to the previous step");
	JButton button_help = new JButton(ACTION_HELP);
	help.addHelp(button_help, "Displays help for the current panel");
	buttons.add(button_previous);
	buttons.add(button_next);
	buttons.add(button_finish);
	buttons.add(button_cancel);
	buttons.add(button_help);

	JPanel labelbox = new JPanel();
	labelbox.setLayout(new BorderLayout());
	labelbox.add(Box.createVerticalStrut(20), BorderLayout.WEST);
	labelbox.add(helpLabel, BorderLayout.CENTER);

	Box buttonBox = Box.createVerticalBox();
	buttonBox.add(buttons);
	buttonBox.add(labelbox);
	return buttonBox;
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:43,代码来源:JabaWizard.java

示例9: initComponents

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * Set up the panel contents and layout
 */
private void initComponents() {
	classSpinner.addChangeListener(spinnerListener);
	help.addHelp(classSpinner, "Enter the number of classes for this system");

	classTable = new ClassTable();

	/* and now some Box black magic */
	//DEK (Federico Granata) 26-09-2003
	Box classSpinnerBox = Box.createHorizontalBox();
	//OLD
	//JLabel spinnerLabel = new JLabel("<html><font size=\"4\">Set the Number of classes (1-" + MAX_CLASSES + "):</font></html>");
	//NEW
	//@author Stefano
	JLabel spinnerLabel = new JLabel(DESCRIPTION_CLASSES);

	classSpinnerBox.add(spinnerLabel);
	//END
	//BEGIN Federico Dall'Orso 9/3/2005
	//OLD
	/*
	classSpinnerBox.add(Box.createGlue());
	*/
	//NEW
	classSpinnerBox.add(Box.createHorizontalStrut(10));
	Box numberBox = Box.createVerticalBox();

	JPanel spinnerPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
	JLabel numberLabel = new JLabel("Number:");
	classSpinner.setMaximumSize(new Dimension(600, 18));
	spinnerPanel.add(numberLabel);
	spinnerPanel.add(classSpinner);
	numberBox.add(spinnerPanel);

	numberBox.add(new JButton(addClass));

	numberBox.setMaximumSize(new Dimension(150, 50));

	classSpinnerBox.add(numberBox);
	//END  Federico Dall'Orso 9/3/2005

	Box classBox = Box.createVerticalBox();
	classBox.add(Box.createVerticalStrut(20));
	classBox.add(classSpinnerBox);
	classBox.add(Box.createVerticalStrut(10));
	JScrollPane classTablePane = new JScrollPane(classTable);
	classTablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
	classTablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
	classBox.add(classTablePane);
	classBox.add(Box.createVerticalStrut(20));

	Box totalBox = Box.createHorizontalBox();
	totalBox.add(Box.createHorizontalStrut(20));
	totalBox.add(classBox);
	totalBox.add(Box.createHorizontalStrut(20));

	setLayout(new BorderLayout());
	add(totalBox, BorderLayout.CENTER);

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:63,代码来源:ClassesPanel.java

示例10: makeTools

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * @return the editing tools bar
 */
JComponent makeTools() {

	Box vbox = Box.createVerticalBox();

	Box box = Box.createHorizontalBox();
	/*JButton copyanchor=new JButton(ldTable.FILL_ACTION);
	help.addHelp(copyanchor,"Copies the value in the focused cell to all selected cells");
	box.add(copyanchor);*/
	/*JButton copydown=new JButton(COPY_DOWN);
	help.addHelp(copydown,"Copies the value in the focused cell down to all cells in the same column");
	box.add(copydown);*/
	help.addHelp(ldExpression, "Select cells, enter an expression and press ENTER or click \"Evaluate\".");
	ldExpression.setMaximumSize(new Dimension(10000, 22));
	box.add(ldExpression);
	JButton evaluate = new JButton(EVALUATE);
	help.addHelp(evaluate, "Click here to fill selected cells with evaluation results.");
	box.add(evaluate);
	box.setBorder(BorderFactory.createEtchedBorder());

	JPanel lPanel = new JPanel();
	lPanel.setLayout(new BorderLayout());
	JLabel helpLabel = new JLabel(
			"<html>Enter the expression to be evaluated, using <b><i>n</i></b> for the number of customers. For syntax details and a list of supported functions click on \"Help\"</html>");
	helpLabel.setHorizontalAlignment(SwingConstants.CENTER);
	lPanel.add(helpLabel);

	vbox.add(lPanel);
	vbox.add(box);

	return vbox;

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:36,代码来源:LDEditingWindow.java

示例11: initComponents

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * Set up the panel contents and layout
 */
private void initComponents() {

	stTable = new STTable();

	Box hBox = Box.createHorizontalBox();
	hBox.add(Box.createHorizontalStrut(20));
	//Horizontal box containing Description label and buttons
	Box descrBox = Box.createVerticalBox();
	descrBox.add(new JLabel(DESCRIPTION_SERVICETIMES));
	descrBox.add(Box.createHorizontalStrut(10));
	descrBox.add(new JButton(SWITCH_TO_SD));
	descrBox.setPreferredSize(new Dimension(220, 1000));
	descrBox.setMinimumSize(new Dimension(200, 200));

	hBox.add(descrBox);
	hBox.add(Box.createHorizontalStrut(10));
	JScrollPane visitTablePane = new JScrollPane(stTable);
	visitTablePane.setPreferredSize(new Dimension(1000, 1000));
	visitTablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
	visitTablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	hBox.add(visitTablePane);
	hBox.add(Box.createHorizontalStrut(20));

	Box totalBox = Box.createVerticalBox();
	totalBox.add(Box.createVerticalStrut(20));
	totalBox.add(hBox);
	totalBox.add(Box.createVerticalStrut(20));

	setLayout(new BorderLayout());
	add(totalBox, BorderLayout.CENTER);

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:36,代码来源:ServiceTimesPanel.java

示例12: initComponents

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * Set up the panel contents and layout
 */
private void initComponents() {

	stTable = new STTable();

	/* and now some Box black magic */

	Box hBox = Box.createHorizontalBox();
	hBox.add(Box.createHorizontalStrut(20));
	//Horizontal box containing Description label and buttons
	Box descrBox = Box.createVerticalBox();
	descrBox.add(new JLabel(DESCRIPTION_SERVICEDEMANDS));
	descrBox.add(Box.createHorizontalStrut(10));
	descrBox.add(new JButton(SWITCH_TO_ST_V));
	descrBox.setPreferredSize(new Dimension(220, 1000));
	descrBox.setMinimumSize(new Dimension(200, 200));

	hBox.add(descrBox);
	hBox.add(Box.createHorizontalStrut(10));
	JScrollPane visitTablePane = new JScrollPane(stTable);
	visitTablePane.setPreferredSize(new Dimension(1000, 1000));
	visitTablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
	visitTablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	hBox.add(visitTablePane);
	hBox.add(Box.createHorizontalStrut(20));

	Box totalBox = Box.createVerticalBox();
	totalBox.add(Box.createVerticalStrut(20));
	totalBox.add(hBox);
	totalBox.add(Box.createVerticalStrut(20));

	setLayout(new BorderLayout());
	add(totalBox, BorderLayout.CENTER);

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:38,代码来源:ServiceDemandsPanel.java

示例13: initComponents

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * Set up the panel contents and layout
 */
private void initComponents() {
	classSpinner.addChangeListener(spinnerListener);
	help.addHelp(classSpinner, "Enter the number of classes for this system");

	classTable = new ClassTable();

	/* and now some Box black magic */
	//DEK (Federico Granata) 26-09-2003
	Box classSpinnerBox = Box.createHorizontalBox();
	//OLD
	//JLabel spinnerLabel = new JLabel("<html><font size=\"4\">Set the Number of classes (1-" + MAX_CLASSES + "):</font></html>");
	//NEW
	//@author Stefano
	JLabel spinnerLabel = new JLabel(DESCRIPTION_CLASSES);

	classSpinnerBox.add(spinnerLabel);
	//END
	//BEGIN Federico Dall'Orso 9/3/2005
	//OLD
	/*
	classSpinnerBox.add(Box.createGlue());
	*/
	//NEW
	classSpinnerBox.add(Box.createHorizontalStrut(10));
	Box numberBox = Box.createVerticalBox();

	JPanel spinnerPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
	JLabel numberLabel = new JLabel("Number:");
	classSpinner.setMaximumSize(new Dimension(600, 18));
	spinnerPanel.add(numberLabel);
	spinnerPanel.add(classSpinner);
	numberBox.add(spinnerPanel);

	numberBox.add(new JButton(addClass));

	numberBox.setMaximumSize(new Dimension(300, 150));

	classSpinnerBox.add(numberBox);
	//END  Federico Dall'Orso 9/3/2005

	Box classBox = Box.createVerticalBox();
	classBox.add(Box.createVerticalStrut(30));
	classBox.add(classSpinnerBox);
	classBox.add(Box.createVerticalStrut(10));
	JScrollPane classTablePane = new JScrollPane(classTable);
	classTablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
	classTablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
	classBox.add(classTablePane);
	classBox.add(Box.createVerticalStrut(30));

	Box totalBox = Box.createHorizontalBox();
	totalBox.add(Box.createHorizontalStrut(20));
	totalBox.add(classBox);
	totalBox.add(Box.createHorizontalStrut(20));

	setLayout(new BorderLayout());
	add(totalBox, BorderLayout.CENTER);

}
 
开发者ID:max6cn,项目名称:jmt,代码行数:63,代码来源:ClassesPanel.java

示例14: initComponents

import javax.swing.Box; //导入方法依赖的package包/类
private void initComponents() {
	//create margins for this panel.
	Box vBox = Box.createVerticalBox();
	Box hBox = Box.createHorizontalBox();
	vBox.add(Box.createVerticalStrut(20));
	vBox.add(hBox);
	vBox.add(Box.createVerticalStrut(20));
	hBox.add(Box.createHorizontalStrut(20));

	//build central panel
	JPanel componentsPanel = new JPanel(new BorderLayout());
	//new BoxLayout(componentsPanel, BoxLayout.Y_AXIS);

	//build upper part of central panel
	JPanel upperPanel = new JPanel(new BorderLayout());
	JLabel descrLabel = new JLabel(STATIONS_DESCRIPTION);
	//descrLabel.setMaximumSize(new Dimension(300, 1000));
	upperPanel.add(descrLabel, BorderLayout.CENTER);

	//build upper right corner of the main panel
	JPanel upRightPanel = new JPanel(new BorderLayout());
	addStation = new JButton(addNewStation);
	addStation.setMinimumSize(DIM_BUTTON_S);
	upRightPanel.add(addStation, BorderLayout.CENTER);

	//build spinner panel
	JPanel spinnerPanel = new JPanel();
	JLabel spinnerDescrLabel = new JLabel("Stations:");
	//stationNumSpinner = new JSpinner();
	stationNumSpinner.setPreferredSize(DIM_BUTTON_XS);
	spinnerPanel.add(spinnerDescrLabel);
	spinnerPanel.add(stationNumSpinner);

	//add all panels to the mail panel
	upRightPanel.add(spinnerPanel, BorderLayout.SOUTH);
	upperPanel.add(upRightPanel, BorderLayout.EAST);
	componentsPanel.add(upperPanel, BorderLayout.NORTH);
	componentsPanel.add(new JScrollPane(stationTable), BorderLayout.CENTER);
	hBox.add(componentsPanel);
	hBox.add(Box.createHorizontalStrut(20));
	this.setLayout(new GridLayout(1, 1));
	this.add(vBox);
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:44,代码来源:StationsPanel.java

示例15: initComponents

import javax.swing.Box; //导入方法依赖的package包/类
/**
 * create components and lay them out
 */
private void initComponents() {

	ldTable = new LDTable();

	//ldTitle=new JLabel("LD editor");
	//ldTitle.setHorizontalAlignment(SwingConstants.CENTER);
	//ldTitle.setHorizontalTextPosition(SwingConstants.CENTER);
	//ldTitle.setFont(new Font("Arial",Font.BOLD|Font.ITALIC,14));

	ldExpression = new JTextField();
	ldExpression.addActionListener(new ActionListener() { // evaluate as the use presses enter
				public void actionPerformed(ActionEvent e) {
					EVALUATE.actionPerformed(e);
				}
			});

	/*JPanel cp=new JPanel();
	cp.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createRaisedBevelBorder(),
	        BorderFactory.createEtchedBorder()));
	getContentPane().add(cp);*/
	Container cp = getContentPane();

	cp.setLayout(new BorderLayout());

	cp.add(makeButtons(), BorderLayout.SOUTH);

	Box vBox = Box.createVerticalBox();
	vBox.add(Box.createVerticalStrut(5));
	JScrollPane ldTablePane = new JScrollPane(ldTable);
	ldTablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
	ldTablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
	vBox.add(ldTablePane);
	//vBox.add(Box.createVerticalStrut(5));
	vBox.add(makeTools());
	//vBox.add(Box.createVerticalStrut(5));

	Box totalBox = Box.createHorizontalBox();
	totalBox.add(Box.createHorizontalStrut(5));
	totalBox.add(vBox);
	totalBox.add(Box.createHorizontalStrut(5));

	cp.add(totalBox, BorderLayout.CENTER);
	//cp.add(ldTitle,BorderLayout.NORTH);

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:49,代码来源:LDEditingWindow.java


注:本文中的javax.swing.Box.createVerticalBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。