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


Java JTabbedPane.setMinimumSize方法代码示例

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


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

示例1: initSidePane

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private void initSidePane() {
	sidePane = new JTabbedPane(JTabbedPane.TOP);
	centerPane.setLeftComponent(sidePane);
	sidePane.setMinimumSize(new Dimension(180, 0));

	projectPanel = new JPanel();
	sidePane.addTab("Project", null, projectPanel, null);
	projectPanel.setLayout(new BorderLayout(0, 0));

	projectScrollPane = new JScrollPane();
	projectPanel.add(projectScrollPane, BorderLayout.CENTER);

	repositoryPanel = new JPanel();
	sidePane.addTab("Repository", null, repositoryPanel, null);
	repositoryPanel.setLayout(new BorderLayout(0, 0));

	repositoryScrollPane = new JScrollPane();
	repositoryPanel.add(repositoryScrollPane, BorderLayout.CENTER);
}
 
开发者ID:roscisz,项目名称:KernelHive,代码行数:20,代码来源:MainFrame.java

示例2: DataEntry

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
public DataEntry() throws IOException
{
    super("DataEntry");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new BarcodeScannerWatcher());

    menus = new Menus();
    setJMenuBar(menus);

    setupBar = new SelectionBar();
    numberTree = new ClassTree();
    addByName = new AddByNamePanel();
    announcer = new AnnouncerPanel();

    tabs = new JTabbedPane();
    tabs.setMinimumSize(new Dimension(270, 400));
    tabs.setPreferredSize(new Dimension(270, 768));
    tabs.addTab("Add By Name", addByName);
    tabs.addTab("Quick Entry", new QuickEntrySearch());
    tabs.addTab("Preregistered", new JScrollPane(numberTree));
    tabs.addTab("Announcer Data", announcer);

    DoubleTableContainer tableScroll = new DoubleTableContainer();
    timeEntry = new TimeEntry();
    menus.add(timeEntry.getTimerMenu());

    HelpPanel help = new HelpPanel();
    MyIpLabel myip = new MyIpLabel();
    help.setBorder(BorderFactory.createLoweredBevelBorder());
    myip.setBorder(BorderFactory.createLoweredBevelBorder());

    JPanel infoBoxes = new JPanel(new MigLayout("fill, ins 0", "[75%]0[25%]"));
    infoBoxes.add(help, "grow, hmin 20");
    infoBoxes.add(myip, "grow");

    JPanel miniPanels = new JPanel(new MigLayout("fill, ins 0, gap 0", "", ""));
    miniPanels.add(new MiniInput.ManualBarcodeInput(), "growx, growy 0, hidemode 2, wrap");
    miniPanels.add(new MiniInput.FilterEntries(), "growx, growy 0, hidemode 2, wrap");

    JPanel content = new JPanel(new MigLayout("fill, ins 1, gap 2", "[grow 0][fill][grow 0]", "[grow 0][grow 0][grow 100][grow 0]"));
    content.add(setupBar, "spanx 3, growx, wrap");
    content.add(tabs, "spany 2, growx 0, growy");
    content.add(miniPanels, "growx, growy 0, hidemode 2");
    content.add(timeEntry, "spany 2, growx 0, growy, w 150!, wrap");
    content.add(tableScroll, "grow, wrap");
    content.add(infoBoxes, "spanx 3, growx, wrap");

    setContentPane(content);
    setBounds(Prefs.getWindowBounds("dataentry"));
    Prefs.trackWindowBounds(this, "dataentry");
    setVisible(true);

    log.log(Level.INFO, "Starting Application: {0}", new java.util.Date());

    Messenger.register(MT.OBJECT_DCLICKED, this);
    Messenger.register(MT.TIME_RECEIVED, this);
    Messenger.register(MT.DATABASE_NOTIFICATION, this);
    Database.openDefault();
}
 
开发者ID:drytoastman,项目名称:scorekeeperfrontend,代码行数:60,代码来源:DataEntry.java


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