当前位置: 首页>>代码示例>>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;未经允许,请勿转载。