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


Java JTabbedPane.setPreferredSize方法代碼示例

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


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

示例1: createTabsPanel

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
private JComponent createTabsPanel() {
    JTabbedPane result = new JTabbedPane();
    result.setPreferredSize(new Dimension(500, 100));
    // panel with basic settings
    SettingsPanel searchPanel = new SettingsPanel(this, "Search");
    addEditor(searchPanel, ExploreKey.TRAVERSE);
    addEditor(searchPanel, ExploreKey.RANDOM);
    addEditor(searchPanel, ExploreKey.ACCEPTOR);
    addEditor(searchPanel, ExploreKey.COUNT);
    addTab(result, searchPanel);
    // panel with basic settings
    SettingsPanel checkingPanel = new SettingsPanel(this, "Model Checking");
    addEditor(checkingPanel, ExploreKey.CHECKING);
    addTab(result, checkingPanel);
    // panel with advanced settings
    SettingsPanel advancedPanel = new SettingsPanel(this, "Advanced");
    addEditor(advancedPanel, ExploreKey.ALGEBRA);
    addEditor(advancedPanel, ExploreKey.ISO);
    addEditor(advancedPanel, ExploreKey.MATCHER);
    addTab(result, advancedPanel);
    return result;
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:23,代碼來源:ExploreConfigDialog.java

示例2: createClientEditorsSection

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
protected JComponent createClientEditorsSection()
{
	freemarker = createHtmlHighlightingPane();
	jquery = new JShuffleBox<NameValue>();
	onloadJs = createJavascriptHighlightingPane();
	onsubmitJs = createJavascriptHighlightingPane();

	JTabbedPane clientEditors = new JTabbedPane();
	addCodeTab(clientEditors, "tab.template", new RTextScrollPane(freemarker)); //$NON-NLS-1$
	addCodeTab(clientEditors, "tab.onload", new RTextScrollPane(onloadJs)); //$NON-NLS-1$
	addCodeTab(clientEditors, "tab.onsubmit", new RTextScrollPane(onsubmitJs)); //$NON-NLS-1$
	clientEditors.addTab(getString("tab.libraries"), jquery); //$NON-NLS-1$
	clientEditors.setPreferredSize(new Dimension(clientEditors.getWidth(), CODE_HEIGHT));

	return clientEditors;
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:17,代碼來源:AdvancedScriptControlEditor.java

示例3: createRightPane

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
@Override
protected JComponent createRightPane() {
	JTabbedPane tabs = new JTabbedPane();
	tabs.addTab("One", new SelectionPanel(graphpanel));
	tabs.addTab("Two", new JLabel("Two"));
	tabs.addTab("Three", new JLabel("Three"));
	tabs.setPreferredSize(new Dimension(80, 300));
	return tabs;
}
 
開發者ID:KeepTheBeats,項目名稱:alevin-svn2,代碼行數:10,代碼來源:PaneledGuiDemo.java

示例4: initializeRightPane

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
private void initializeRightPane() {
	JTabbedPane tabs = new JTabbedPane();

	tabs.addTab("Selection", new SelectionPanel(new MySelectionTreeModel(),
			graphpanel));
	tabs.addTab("Mapping",
			mappingPanel = new MappingPanel(graphpanel, scenario));

	tabs.setPreferredSize(new Dimension(250, 300));
	this.rightPane.add(tabs, BorderLayout.CENTER);
}
 
開發者ID:KeepTheBeats,項目名稱:alevin-svn2,代碼行數:12,代碼來源:GUI.java

示例5: createServerEditorsSection

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
protected JComponent createServerEditorsSection()
{
	readJs = createJavascriptHighlightingPane();
	storeJs = createJavascriptHighlightingPane();

	JTabbedPane serverEditors = new JTabbedPane();
	addCodeTab(serverEditors, "tab.read", new RTextScrollPane(readJs)); //$NON-NLS-1$
	addCodeTab(serverEditors, "tab.store", new RTextScrollPane(storeJs)); //$NON-NLS-1$
	serverEditors.setPreferredSize(new Dimension(serverEditors.getWidth(), CODE_HEIGHT));

	return serverEditors;
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:13,代碼來源:AdvancedScriptControlEditor.java

示例6: PreferencesFrame

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
private PreferencesFrame() {
	setDefaultCloseOperation(HIDE_ON_CLOSE);
	setJMenuBar(new LogisimMenuBar(this, null));

	panels = new OptionsPanel[] { new TemplateOptions(this), new IntlOptions(this), new WindowOptions(this),
			new LayoutOptions(this), new ExperimentalOptions(this), new ForkOptions(this), };
	tabbedPane = new JTabbedPane();
	int intlIndex = -1;
	for (int index = 0; index < panels.length; index++) {
		OptionsPanel panel = panels[index];
		tabbedPane.addTab(panel.getTitle(), null, panel, panel.getToolTipText());
		if (panel instanceof IntlOptions)
			intlIndex = index;
	}

	JPanel buttonPanel = new JPanel();
	buttonPanel.add(close);
	close.addActionListener(myListener);

	Container contents = getContentPane();
	tabbedPane.setPreferredSize(new Dimension(450, 300));
	contents.add(tabbedPane, BorderLayout.CENTER);
	contents.add(buttonPanel, BorderLayout.SOUTH);

	if (intlIndex >= 0)
		tabbedPane.setSelectedIndex(intlIndex);

	LocaleManager.addLocaleListener(myListener);
	myListener.localeChanged();
	pack();
	setLocationRelativeTo(null);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:33,代碼來源:PreferencesFrame.java

示例7: LogFrame

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
public LogFrame(Project project) {
	this.project = project;
	this.windowManager = new WindowMenuManager();
	project.addProjectListener(myListener);
	project.addLibraryListener(myListener);
	setDefaultCloseOperation(HIDE_ON_CLOSE);
	setJMenuBar(new LogisimMenuBar(this, project));
	setSimulator(project.getSimulator(), project.getCircuitState());

	panels = new LogPanel[] { new SelectionPanel(this), new ScrollPanel(this), new FilePanel(this), };
	tabbedPane = new JTabbedPane();
	for (int index = 0; index < panels.length; index++) {
		LogPanel panel = panels[index];
		tabbedPane.addTab(panel.getTitle(), null, panel, panel.getToolTipText());
	}

	JPanel buttonPanel = new JPanel();
	buttonPanel.add(clearLog);
	clearLog.addActionListener(myListener);

	Container contents = getContentPane();
	tabbedPane.setPreferredSize(new Dimension(450, 300));
	contents.add(tabbedPane, BorderLayout.CENTER);
	contents.add(buttonPanel, BorderLayout.SOUTH);

	LocaleManager.addLocaleListener(myListener);
	myListener.localeChanged();
	pack();
	setLocationRelativeTo(null);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:31,代碼來源:LogFrame.java

示例8: OptionsFrame

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
public OptionsFrame(Project project) {
	this.project = project;
	this.file = project.getLogisimFile();
	file.addLibraryListener(myListener);
	setDefaultCloseOperation(HIDE_ON_CLOSE);
	setJMenuBar(new LogisimMenuBar(this, project));

	panels = new OptionsPanel[] { new SimulateOptions(this), new ToolbarOptions(this), new MouseOptions(this), };
	tabbedPane = new JTabbedPane();
	for (int index = 0; index < panels.length; index++) {
		OptionsPanel panel = panels[index];
		tabbedPane.addTab(panel.getTitle(), null, panel, panel.getToolTipText());
	}

	JPanel buttonPanel = new JPanel();
	buttonPanel.add(revert);
	buttonPanel.add(close);
	revert.addActionListener(myListener);
	close.addActionListener(myListener);

	Container contents = getContentPane();
	tabbedPane.setPreferredSize(new Dimension(450, 300));
	contents.add(tabbedPane, BorderLayout.CENTER);
	contents.add(buttonPanel, BorderLayout.SOUTH);

	LocaleManager.addLocaleListener(myListener);
	myListener.localeChanged();
	pack();
	setLocationRelativeTo(null);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:31,代碼來源:OptionsFrame.java

示例9: initOutputPane

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
private void initOutputPane()
{
    JTabbedPane output = new JTabbedPane(JTabbedPane.BOTTOM);
    JConsole console = new JConsole();

    console.setBackground(Color.WHITE);
    _model = new DemoModel(console);
    _console = new JConsole();

    output.addTab("Console", _console);
    output.setBackground(Color.WHITE);
    output.setPreferredSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
    output.addTab("Interpreter", console);
    try
    {

        //
        _helpTextArea.setText(_model.help());
    }
    catch (IOException x)
    {
        exceptionThrown(x);
    }

    //
    _container.add(output);
}
 
開發者ID:JetBrains,項目名稱:intellij-deps-ini4j,代碼行數:28,代碼來源:Demo.java

示例10: initPanel

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
private void initPanel() {
	this.setLayout(new BorderLayout(20, 5));

	/*Set Description Label*/
	Box label = Box.createVerticalBox();
	label.add(Box.createVerticalStrut(10));
	label.add(new JLabel(CLUSTERING_INFO_DESCRIPTION));
	this.add(label, BorderLayout.NORTH);
	JPanel p1 = new JPanel(new BorderLayout());

	/*Set list of clustering*/
	Box listsPanel = Box.createHorizontalBox();
	listsPanel.add(Box.createHorizontalStrut(10));

	JPanel west = new JPanel(new GridLayout(2, 1, 0, 0));
	west.setPreferredSize(new Dimension(200, 400));

	listsPanel.add(west);
	listsPanel.add(Box.createHorizontalStrut(10));

	JPanel clusting = new JPanel(new BorderLayout(0, 5));

	//La Table del clustering sempre presente e poi aggiunta a seconda del tipo
	clusting.add(new JLabel(HTML_START + HTML_FONT_TITLE + "Clusterings" + HTML_FONT_TIT_END_NO_CAPO + HTML_FONT_NORM), BorderLayout.NORTH);
	clusting.add(new JScrollPane(getClusteringTable(), ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), BorderLayout.CENTER);

	west.add(clusting);
	west.add(cluster);
	p1.add(listsPanel, BorderLayout.WEST);

	/*Set Tabbed for statistics*/
	tabbed = new JTabbedPane();
	tabbed.setPreferredSize(new Dimension(600, 400));
	p1.add(tabbed, BorderLayout.CENTER);

	clusingP = new JPanel(new GridLayout(1, 1));
	clusingP.setName("Clustering Info");
	clusingP.setPreferredSize(new Dimension(600, 400));
	tabbed.add(clusingP);

	clustP = new JPanel(new GridLayout(1, 1));
	clustP.setName("Cluster Info");
	clustP.setPreferredSize(new Dimension(600, 400));
	tabbed.add(clustP);

	matrixPanel = new JPanel(new GridLayout(1, 1));
	matrixPanel.setPreferredSize(new Dimension(600, 400));
	matrixPanel.setName("Dispersion Matrix");
	tabbed.add(matrixPanel);

	this.add(p1, BorderLayout.CENTER);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:54,代碼來源:ClusteringInfoPanel.java

示例11: initPanel

import javax.swing.JTabbedPane; //導入方法依賴的package包/類
private void initPanel() {
	this.setLayout(new BorderLayout(20, 5));

	/*Set Description Label*/
	Box label = Box.createVerticalBox();
	label.add(Box.createVerticalStrut(10));
	label.add(new JLabel(CLUSTERING_INFO_DESCRIPTION));
	this.add(label, BorderLayout.NORTH);
	//JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
	JPanel p1 = new JPanel(new BorderLayout());

	/*Set list of clustering*/
	Box listsPanel = Box.createHorizontalBox();
	listsPanel.add(Box.createHorizontalStrut(10));

	JPanel west = new JPanel(new GridLayout(2, 1, 0, 0));
	west.setPreferredSize(new Dimension(200, 400));

	listsPanel.add(west);
	listsPanel.add(Box.createHorizontalStrut(10));

	JPanel clusting = new JPanel(new BorderLayout(0, 5));
	//JPanel cluster=new JPanel(new BorderLayout(0,5));

	//La Table del clustering sempre presente e poi aggiunta a seconda del tipo
	clusting.add(new JLabel(HTML_START + HTML_FONT_TITLE + "Clusterings" + HTML_FONT_TIT_END_NO_CAPO + HTML_FONT_NORM), BorderLayout.NORTH);
	clusting.add(new JScrollPane(getClusteringTable(), ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), BorderLayout.CENTER);

	//cluster.add(new JLabel(HTML_START
	//		+ HTML_FONT_TITLE +"Num. Of Clusters"+ HTML_FONT_TIT_END_NO_CAPO + HTML_FONT_NORM),BorderLayout.NORTH);
	//cluster.add(new JScrollPane(getClusterTable(),JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED),BorderLayout.CENTER);

	west.add(clusting);
	west.add(cluster);
	p1.add(listsPanel, BorderLayout.WEST);

	/*Set Tabbed for statistics*/
	tabbed = new JTabbedPane();
	tabbed.setPreferredSize(new Dimension(600, 400));
	p1.add(tabbed, BorderLayout.CENTER);

	clusingP = new JPanel(new GridLayout(1, 1));
	clusingP.setName("Clustering Info");
	clusingP.setPreferredSize(new Dimension(600, 400));
	tabbed.add(clusingP);

	clustP = new JPanel(new GridLayout(1, 1));
	clustP.setName("Cluster Info");
	clustP.setPreferredSize(new Dimension(600, 400));
	tabbed.add(clustP);

	matrixPanel = new JPanel(new GridLayout(1, 1));
	matrixPanel.setPreferredSize(new Dimension(600, 400));
	matrixPanel.setName("Dispersion Matrix");
	tabbed.add(matrixPanel);

	this.add(p1, BorderLayout.CENTER);
}
 
開發者ID:HOMlab,項目名稱:QN-ACTR-Release,代碼行數:60,代碼來源:ClusteringInfoPanel.java

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