當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。