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


Java CompoundBorder.getBorderInsets方法代碼示例

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


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

示例1: getJTopPanel

import javax.swing.border.CompoundBorder; //導入方法依賴的package包/類
/**
 * This method initializes jTopPanel	
 * 	
 * @return javax.swing.JPanel	
 */
private JPanel getJTopPanel() {
	if (jTopPanel == null) {
		jTopPanel = new JPanel();
		CompoundBorder border = BorderFactory.createCompoundBorder(
			BorderFactory.createCompoundBorder(
				BorderFactory.createLineBorder(SystemColor.activeCaption,2),
				JPlagCreator.titleBorder(Messages.getString(
					"InfoPanel.JPlag_progress"))), //$NON-NLS-1$
			BorderFactory.createEmptyBorder(0,2,2,2));
		jTopPanel.setBorder(border);
		Insets insets = border.getBorderInsets(jTopPanel);
		jTopPanel.setPreferredSize(
			new java.awt.Dimension(490+insets.left+insets.right, 194));
		jTopPanel.setLayout(new BorderLayout());
		jTopPanel.add(getJPanel2(), java.awt.BorderLayout.NORTH);
		jTopPanel.add(getJProgressBar(), java.awt.BorderLayout.EAST);
	}
	return jTopPanel;
}
 
開發者ID:jplag,項目名稱:jplag,代碼行數:25,代碼來源:InfoPanel.java

示例2: JIconTextField

import javax.swing.border.CompoundBorder; //導入方法依賴的package包/類
public JIconTextField(){
    super();
    this.icon = null;
    /*
    Border border = UIManager.getBorder("TextField.border");

    this.dummyInsets = border.getBorderInsets(dummy);
    */
    JTextField dummy = new JTextField();
    Border line = BorderFactory.createLineBorder(Color.lightGray);
    Border empty = new EmptyBorder(6,26,5,5);
    CompoundBorder border = new CompoundBorder(line, empty);
    this.dummyInsets = border.getBorderInsets(dummy);
    this.setBorder(border);
}
 
開發者ID:4x7y,項目名稱:BioPano,代碼行數:16,代碼來源:SearchToolBar.java


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