Java Code Examples for javax.swing.JTabbedPane#setBounds()
The following examples show how to use
javax.swing.JTabbedPane#setBounds() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConfigPanel.java From dkpro-jwpl with Apache License 2.0 | 6 votes |
private void createTabbedPane() { tabs = new JTabbedPane(); tabs.setBounds(5, 5, 580, 300); tabs.add("Mode", new ModePanel(controller)); tabs.add("Externals", new ExternalProgramsPanel(controller)); tabs.add("Input", new InputPanel(controller)); tabs.add("Output", new OutputPanel(controller)); tabs.add("Database", new SQLPanel(controller)); tabs.add("Cache", new CachePanel(controller)); tabs.add("Logging", new LoggingPanel(controller)); tabs.add("Debug", new DebugPanel(controller)); tabs.add("Filter", new FilterPanel(controller)); this.add(tabs); }
Example 2
Source File: FieldConfigInlineFeature.java From sldeditor with GNU General Public License v3.0 | 5 votes |
/** Creates the ui. */ /* * (non-Javadoc) * * @see com.sldeditor.ui.detail.config.FieldConfigBase#createUI() */ @Override public void createUI() { if (inlineGML == null) { inlineGML = new InlineGMLPreviewPanel(this, NO_OF_ROWS); inlineFeature = new InlineFeaturePanel(this, NO_OF_ROWS); tabbedPane = new JTabbedPane(JTabbedPane.TOP); tabbedPane.addTab( Localisation.getString( FieldConfigBase.class, "FieldConfigInlineFeature.feature"), null, inlineFeature, Localisation.getString( FieldConfigBase.class, "FieldConfigInlineFeature.feature.tooltip")); tabbedPane.addTab( Localisation.getString(FieldConfigBase.class, "FieldConfigInlineFeature.gml"), null, inlineGML, Localisation.getString( FieldConfigBase.class, "FieldConfigInlineFeature.gml.tooltip")); tabbedPane.setBounds(0, 0, inlineGML.getWidth(), inlineGML.getHeight()); int xPos = getXPos(); FieldPanel fieldPanel = createFieldPanel(xPos, BasePanel.WIDGET_HEIGHT * NO_OF_ROWS, getLabel()); fieldPanel.add(tabbedPane); } }
Example 3
Source File: AboutDialog.java From dualsub with GNU General Public License v3.0 | 4 votes |
private void initComponents() { setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); setTitle(I18N.getText("Window.name.text")); // Features this.setResizable(false); getContentPane().setLayout(null); this.getContentPane().setBackground(parent.getBackground()); // Tabs JTabbedPane tabs = new JTabbedPane(); tabs.setBounds(10, 11, 474, 351); this.getContentPane().add(tabs); // About tab JPanel aboutTab = new JPanel(); aboutTab.setBackground(parent.getBackground()); tabs.addTab(I18N.getHtmlText("About.about.text"), aboutTab); aboutTab.setLayout(null); JLabel lblDualSub = new JLabel(); lblDualSub.setIcon(new ImageIcon(ClassLoader .getSystemResource("img/dualsub-about.png"))); lblDualSub.setBounds(66, 0, 330, 140); aboutTab.add(lblDualSub); scrollPane = new JScrollPane(); scrollPane.setBounds(0, 139, 470, 187); aboutTab.add(scrollPane); JTextPane txtrDualSub = new JTextPane(); scrollPane.setViewportView(txtrDualSub); txtrDualSub.setContentType("text/html"); addTextContentToArea(txtrDualSub, "README.md", true); txtrDualSub.setEditable(false); tabs.setVisible(true); // Changelog tab JPanel changelogTab = new JPanel(); changelogTab.setBackground(parent.getBackground()); changelogTab.setLayout(null); tabs.addTab(I18N.getHtmlText("About.changelog.text"), null, changelogTab, null); scrollChangelog = new JScrollPane(); scrollChangelog.setBounds(0, 0, 470, 327); changelogTab.add(scrollChangelog); JTextPane txtChangelog = new JTextPane(); scrollChangelog.setViewportView(txtChangelog); addTextContentToArea(txtChangelog, "changelog", false); txtChangelog.setEditable(false); // License tab JPanel licenseTab = new JPanel(); licenseTab.setBackground(parent.getBackground()); licenseTab.setLayout(null); tabs.addTab(I18N.getHtmlText("About.license.text"), null, licenseTab, null); scrollLicense = new JScrollPane(); scrollLicense.setBounds(0, 0, 470, 327); licenseTab.add(scrollLicense); JTextPane txtLicense = new JTextPane(); scrollLicense.setViewportView(txtLicense); addTextContentToArea(txtLicense, "LICENSE", false); txtLicense.setEditable(false); JButton btnOk = new JButton(I18N.getHtmlText("About.ok.text")); btnOk.setBounds(203, 373, 89, 23); btnOk.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { setVisible(false); } }); this.getContentPane().add(btnOk); }