當前位置: 首頁>>代碼示例>>Java>>正文


Java Box.setMinimumSize方法代碼示例

本文整理匯總了Java中javax.swing.Box.setMinimumSize方法的典型用法代碼示例。如果您正苦於以下問題:Java Box.setMinimumSize方法的具體用法?Java Box.setMinimumSize怎麽用?Java Box.setMinimumSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.Box的用法示例。


在下文中一共展示了Box.setMinimumSize方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: 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

示例2: 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

示例3: 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

示例4: 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


注:本文中的javax.swing.Box.setMinimumSize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。