Example usage for javax.swing JTabbedPane JTabbedPane

List of usage examples for javax.swing JTabbedPane JTabbedPane

Introduction

In this page you can find the example usage for javax.swing JTabbedPane JTabbedPane.

Prototype

public JTabbedPane() 

Source Link

Document

Creates an empty TabbedPane with a default tab placement of JTabbedPane.TOP.

Usage

From source file:org.pentaho.reporting.ui.datasources.olap4j.Olap4JDataSourceEditor.java

private JPanel createQueryDetailsPanel() {
    final JPanel queryNamePanel = new JPanel(new BorderLayout());
    queryNamePanel.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8));
    queryNamePanel.add(new JLabel(Messages.getString("Olap4JDataSourceEditor.QueryNameLabel")),
            BorderLayout.NORTH);/*from  w  w w. j ava  2  s .com*/
    queryNamePanel.add(queryNameTextField, BorderLayout.SOUTH);

    final JPanel queryControlsPanel = new JPanel(new BorderLayout());
    queryControlsPanel.add(new JLabel(Messages.getString("Olap4JDataSourceEditor.QueryLabel")),
            BorderLayout.WEST);

    final JPanel queryPanel = new JPanel(new BorderLayout());
    queryPanel.add(queryControlsPanel, BorderLayout.NORTH);
    queryPanel.add(new JScrollPane(queryTextArea), BorderLayout.CENTER);
    queryPanel.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8));

    final JTabbedPane queryScriptTabPane = new JTabbedPane();
    queryScriptTabPane.addTab(Messages.getString("Olap4JDataSourceEditor.StaticQuery"), queryPanel);
    queryScriptTabPane.addTab(Messages.getString("Olap4JDataSourceEditor.QueryScripting"),
            createQueryScriptTab());

    // Create the query details panel
    final JPanel queryDetailsPanel = new JPanel(new BorderLayout());
    queryDetailsPanel.add(BorderLayout.NORTH, queryNamePanel);
    queryDetailsPanel.add(BorderLayout.CENTER, queryScriptTabPane);
    return queryDetailsPanel;
}

From source file:org.pentaho.reporting.ui.datasources.pmd.PmdDataSourceEditor.java

protected Component createContentPane() {
    final JPanel queryTextAreaHeaderPanel = new JPanel(new BorderLayout());
    queryTextAreaHeaderPanel.add(new JLabel(Messages.getString("PmdDataSourceEditor.QueryLabel")),
            BorderLayout.WEST);/*w  ww.  j a va  2  s  .c om*/
    queryTextAreaHeaderPanel.add(queryDesignerButton, BorderLayout.EAST);

    final JPanel queryConfigurationPanel = new JPanel();
    queryConfigurationPanel.setLayout(new BorderLayout());
    queryConfigurationPanel.add(queryTextAreaHeaderPanel, BorderLayout.NORTH);
    queryConfigurationPanel.add(new RTextScrollPane(700, 500, queryTextArea, true), BorderLayout.CENTER);

    final JTabbedPane queryScriptTabPane = new JTabbedPane();
    queryScriptTabPane.addTab(Messages.getString("PmdDataSourceEditor.StaticQuery"), queryConfigurationPanel);
    queryScriptTabPane.addTab(Messages.getString("PmdDataSourceEditor.QueryScripting"), createQueryScriptTab());

    final JPanel queryAreaPanel = new JPanel();
    queryAreaPanel.setLayout(new BorderLayout());
    queryAreaPanel.add(createGlobalPropertiesPanel(), BorderLayout.NORTH);
    queryAreaPanel.add(queryScriptTabPane, BorderLayout.CENTER);

    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.addTab(Messages.getString("PmdDataSourceEditor.DataSource"), queryAreaPanel);
    tabbedPane.addTab(Messages.getString("PmdDataSourceEditor.GlobalScripting"), createGlobalScriptTab());

    final JPanel contentPanel = new JPanel(new BorderLayout());
    contentPanel.add(tabbedPane, BorderLayout.CENTER);
    contentPanel.add(createPreviewButtonsPanel(), BorderLayout.SOUTH);
    contentPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

    return contentPanel;
}

From source file:org.pentaho.ui.xul.swing.tags.SwingTabbox.java

public SwingTabbox(Element self, XulComponent parent, XulDomContainer domContainer, String tagName) {
    super("tabbox");
    tabpane = new JTabbedPane();
    setManagedObject(tabpane);//from www . j  av a2s .  c o m
}

From source file:org.photovault.swingui.BrowserWindow.java

protected void createUI(PhotoCollection collection) {
    window.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    tabPane = new JTabbedPane();
    queryPane = new QueryPane();
    PhotoFolderTreeController treeCtrl = new PhotoFolderTreeController(window, this);
    viewCtrl = new PhotoViewController(window, this);
    treePane = treeCtrl.folderTree;/* w ww . j  av  a  2 s  . c  o  m*/
    viewPane = viewCtrl.getThumbPane();
    previewPane = viewCtrl.getPreviewPane();
    tabPane.addTab("Query", queryPane);
    tabPane.addTab("Folders", treePane);

    VolumeTreeController volTreeCtrl = new VolumeTreeController(this);
    JTree volumeTree = volTreeCtrl.getView();
    JScrollPane voltreeScrollPane = new JScrollPane(volumeTree);
    voltreeScrollPane.setPreferredSize(new Dimension(200, 500));
    tabPane.add("Volumes", voltreeScrollPane);

    // TODO: get rid of this!!!!
    EditSelectionColorsAction colorAction = (EditSelectionColorsAction) viewPane.getEditSelectionColorsAction();
    colorAction.setPreviewCtrl(previewPane);

    // Set listeners to both query and folder tree panes

    /*
    If an actionEvent comes from query pane, swich to query results.
     */
    queryPane.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            viewCtrl.setCollection(queryPane.getResultCollection());
        }
    });

    /*
    If the selected folder is changed in treePane, switch to that immediately
     */

    treeCtrl.registerEventListener(PhotoFolderTreeEvent.class, new DefaultEventListener<PhotoCollection>() {

        public void handleEvent(DefaultEvent<PhotoCollection> event) {
            PhotoCollection c = event.getPayload();
            if (c != null) {
                viewCtrl.setCollection(c);
                if (c instanceof PhotoFolder) {
                    PhotoFolder f = (PhotoFolder) c;

                    if (f.getExternalDir() != null) {
                        ExternalDir ed = f.getExternalDir();
                        folderIndexer.updateDir(ed.getVolume(), ed.getPath());
                        viewCtrl.setIndexingOngoing(true);
                    }
                }
            }
        }
    });

    volTreeCtrl.registerEventListener(PhotoFolderTreeEvent.class, new DefaultEventListener<PhotoCollection>() {

        public void handleEvent(DefaultEvent<PhotoCollection> event) {
            PhotoCollection c = event.getPayload();
            if (c != null) {
                viewCtrl.setCollection(c);
                if (c instanceof ExtDirPhotos) {
                    ExtDirPhotos photos = (ExtDirPhotos) c;
                    ExternalVolume vol = (ExternalVolume) viewCtrl.getDAOFactory().getVolumeDAO()
                            .getVolume(photos.getVolId());
                    folderIndexer.updateDir(vol, photos.getDirPath());
                    viewCtrl.setIndexingOngoing(true);
                }
            }
        }
    });

    collectionPane = viewCtrl.getCollectionPane();

    JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tabPane, collectionPane);
    split.putClientProperty(JSplitPane.ONE_TOUCH_EXPANDABLE_PROPERTY, new Boolean(true));
    Container cp = window.getContentPane();
    cp.setLayout(new BorderLayout());
    cp.add(split, BorderLayout.CENTER);

    statusBar = new StatusBar();
    cp.add(statusBar, BorderLayout.SOUTH);

    // Create actions for BrowserWindow UI

    ImageIcon indexDirIcon = getIcon("index_dir.png");
    DefaultAction indexDirAction = new DefaultAction("Index directory...", indexDirIcon) {

        public void actionPerformed(ActionEvent e) {
            indexDir();
        }
    };
    indexDirAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_D);
    indexDirAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Index all images in a directory");
    this.registerAction("new_ext_vol", indexDirAction);

    ImageIcon importIcon = getIcon("import.png");
    importAction = new AbstractAction("Import image...", importIcon) {

        public void actionPerformed(ActionEvent e) {
            importFile();
        }
    };
    importAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_O);
    importAction.putValue(AbstractAction.ACCELERATOR_KEY,
            KeyStroke.getKeyStroke(KeyEvent.VK_O, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));

    importAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Import new image into database");

    ImageIcon updateIcon = getIcon("update_indexed_dirs.png");
    UpdateIndexAction updateIndexAction = new UpdateIndexAction(viewCtrl, "Update indexed dirs", updateIcon,
            "Check for changes in previously indexed directories", KeyEvent.VK_U);
    this.registerAction("update_indexed_dirs", updateIndexAction);
    updateIndexAction.addStatusChangeListener(statusBar);

    ImageIcon previewTopIcon = getIcon("view_preview_top.png");
    DefaultAction previewTopAction = new DefaultAction("Preview on top", previewTopIcon) {

        public void actionPerformed(ActionEvent e) {
            viewCtrl.setLayout(PhotoViewController.Layout.PREVIEW_HORIZONTAL_THUMBS);
        }
    };
    previewTopAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Show preview on top of thumbnails");
    previewTopAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_T);
    this.registerAction("view_preview_top", previewTopAction);

    ImageIcon previewRightIcon = getIcon("view_preview_right.png");
    DefaultAction previewRightAction = new DefaultAction("Preview on right", previewRightIcon) {

        public void actionPerformed(ActionEvent e) {
            viewCtrl.setLayout(PhotoViewController.Layout.PREVIEW_VERTICAL_THUMBS);
        }
    };
    previewRightAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Show preview on right of thumbnails");
    previewRightAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_R);
    this.registerAction("view_preview_right", previewRightAction);

    ImageIcon previewNoneIcon = getIcon("view_no_preview.png");
    DefaultAction previewNoneAction = new DefaultAction("No preview", previewNoneIcon) {

        public void actionPerformed(ActionEvent e) {
            viewCtrl.setLayout(PhotoViewController.Layout.ONLY_THUMBS);
        }
    };
    previewNoneAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Show no preview image");
    previewNoneAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_O);
    this.registerAction("view_no_preview", previewNoneAction);

    DefaultAction previewLargeAction = new DefaultAction("Large", null) {

        public void actionPerformed(ActionEvent e) {
            viewCtrl.setPreviewSize(200);
        }
    };
    DefaultAction previewSmallAction = new DefaultAction("Small", null) {

        public void actionPerformed(ActionEvent e) {
            viewCtrl.setPreviewSize(100);
        }
    };

    JToolBar tb = createToolbar();
    cp.add(tb, BorderLayout.NORTH);

    // Create the menu bar & menus
    JMenuBar menuBar = new JMenuBar();
    window.setJMenuBar(menuBar);
    // File menu
    JMenu fileMenu = new JMenu("File");
    fileMenu.setMnemonic(KeyEvent.VK_F);
    menuBar.add(fileMenu);

    JMenuItem newWindowItem = new JMenuItem("New window", KeyEvent.VK_N);
    newWindowItem.setIcon(getIcon("window_new.png"));
    newWindowItem.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            BrowserWindow br = new BrowserWindow(getParentController(), null);
            //          br.setVisible( true );
        }
    });
    fileMenu.add(newWindowItem);

    JMenuItem importItem = new JMenuItem(importAction);
    fileMenu.add(importItem);

    JMenuItem indexDirItem = new JMenuItem(indexDirAction);
    fileMenu.add(indexDirItem);

    fileMenu.add(new JMenuItem(viewCtrl.getActionAdapter("update_indexed_dirs")));

    ExportSelectedAction exportAction = (ExportSelectedAction) viewPane.getExportSelectedAction();
    JMenuItem exportItem = new JMenuItem(exportAction);
    exportAction.addStatusChangeListener(statusBar);
    fileMenu.add(exportItem);

    JMenu dbMenu = new JMenu("Database");
    dbMenu.setMnemonic(KeyEvent.VK_B);
    dbMenu.setIcon(getIcon("empty_icon.png"));

    ExportMetadataAction exportMetadata = new ExportMetadataAction("Export as XML...", null,
            "Export whole database as XML file", KeyEvent.VK_E);
    dbMenu.add(new JMenuItem(exportMetadata));

    ImportXMLAction importMetadata = new ImportXMLAction("Import XML data...", null,
            "Import data from other Photovault database as XML", KeyEvent.VK_I);
    importMetadata.addStatusChangeListener(statusBar);
    dbMenu.add(new JMenuItem(importMetadata));

    fileMenu.add(dbMenu);

    JMenuItem exitItem = new JMenuItem("Exit", KeyEvent.VK_X);
    exitItem.setIcon(getIcon("exit.png"));
    exitItem.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            System.exit(0);
        }
    });
    fileMenu.add(exitItem);

    JMenu viewMenu = new JMenu("View");
    viewMenu.setMnemonic(KeyEvent.VK_V);
    menuBar.add(viewMenu);

    JMenuItem vertIconsItem = new JMenuItem(previewRightAction);
    viewMenu.add(vertIconsItem);

    JMenuItem horzIconsItem = new JMenuItem(previewTopAction);
    viewMenu.add(horzIconsItem);

    JMenuItem noPreviewItem = new JMenuItem(previewNoneAction);
    viewMenu.add(noPreviewItem);

    JMenuItem nextPhotoItem = new JMenuItem(viewPane.getSelectNextAction());
    viewMenu.add(nextPhotoItem);

    JMenuItem prevPhotoItem = new JMenuItem(viewPane.getSelectPreviousAction());
    viewMenu.add(prevPhotoItem);

    viewMenu.add(new JMenuItem(previewSmallAction));
    viewMenu.add(new JMenuItem(previewLargeAction));

    JMenu sortMenu = new JMenu("Sort by");
    sortMenu.setMnemonic(KeyEvent.VK_S);
    sortMenu.setIcon(getIcon("empty_icon.png"));
    JMenuItem byDateItem = new JMenuItem(new SetPhotoOrderAction(viewCtrl, new ShootingDateComparator(), "Date",
            null, "Order photos by date", KeyEvent.VK_D));
    sortMenu.add(byDateItem);
    JMenuItem byPlaceItem = new JMenuItem(new SetPhotoOrderAction(viewCtrl, new ShootingPlaceComparator(),
            "Place", null, "Order photos by shooting place", KeyEvent.VK_P));
    sortMenu.add(byPlaceItem);
    JMenuItem byQualityItem = new JMenuItem(new SetPhotoOrderAction(viewCtrl, new QualityComparator(),
            "Quality", null, "Order photos by quality", KeyEvent.VK_Q));
    sortMenu.add(byQualityItem);
    viewMenu.add(sortMenu);

    // Set default ordering by date
    byDateItem.getAction().actionPerformed(new ActionEvent(this, 0, "Setting default"));
    JMenu imageMenu = new JMenu("Image");
    imageMenu.setMnemonic(KeyEvent.VK_I);
    menuBar.add(imageMenu);

    imageMenu.add(new JMenuItem(viewPane.getEditSelectionPropsAction()));
    imageMenu.add(new JMenuItem(viewPane.getShowSelectedPhotoAction()));
    imageMenu.add(new JMenuItem(viewCtrl.getActionAdapter("rotate_cw")));
    imageMenu.add(new JMenuItem(viewCtrl.getActionAdapter("rotate_ccw")));
    imageMenu.add(new JMenuItem(viewCtrl.getActionAdapter("rotate_180")));
    imageMenu.add(new JMenuItem(previewPane.getCropAction()));
    imageMenu.add(new JMenuItem(viewPane.getEditSelectionColorsAction()));
    imageMenu.add(new JMenuItem(viewPane.getDeleteSelectedAction()));

    // Create the Quality submenu
    JMenu qualityMenu = new JMenu("Quality");
    qualityMenu.setIcon(getIcon("empty_icon.png"));

    for (int n = 0; n < 6; n++) {
        Action qualityAction = viewCtrl.getActionAdapter("quality_" + n);
        JMenuItem qualityMenuItem = new JMenuItem(qualityAction);
        qualityMenu.add(qualityMenuItem);
    }
    imageMenu.add(qualityMenu);

    JMenu aboutMenu = new JMenu("About");
    aboutMenu.setMnemonic(KeyEvent.VK_A);
    aboutMenu.add(new JMenuItem(new ShowAboutDlgAction("About Photovault...", null, "", null)));

    menuBar.add(Box.createHorizontalGlue());
    menuBar.add(aboutMenu);
    window.pack();
    window.setVisible(true);
}

From source file:org.photovault.swingui.PhotoInfoEditor.java

protected void createUI() {
    setLayout(new BorderLayout());
    setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    tabPane = new JTabbedPane();
    add(tabPane, BorderLayout.CENTER);

    // General pane
    JPanel generalPane = new JPanel();
    tabPane.addTab("General", generalPane);

    // Create the fields & their labels

    // Photographer field
    JLabel photographerLabel = new JLabel("Photographer");
    photographerField = createMvTextField("photographer", 30);
    photographerDoc = photographerField.getDocument();

    // "Fuzzy time" field
    JLabel fuzzyDateLabel = new JLabel("Shooting date");
    fuzzyDateField = new JTextField(30);
    fuzzyDateDoc = fuzzyDateField.getDocument();
    fuzzyDateDoc.putProperty(FIELD, PhotoInfoFields.FUZZY_SHOOT_TIME);
    fuzzyDateDoc.addDocumentListener(this);

    JLabel qualityLabel = new JLabel("Quality");
    qualityField = new JComboBox(qualityStrings);
    qualityField.addActionListener(this);

    StarRating qualityStars = new StarRating(5);
    FieldController<Integer> qfCtrl = ctrl.getFieldController("quality");
    ValueModel qualityFieldValue = new PropertyAdapter(qfCtrl, "value", true);
    ValueModel starCount = new PropertyAdapter(qualityStars, "selection", true);
    PropertyConnector.connect(qualityFieldValue, "value", starCount, "value");

    // Shooting place field
    JLabel shootingPlaceLabel = new JLabel("Shooting place");
    shootingPlaceField = createMvTextField("shotLocation.description", 30);
    shootingPlaceDoc = shootingPlaceField.getDocument();
    JLabel shotLocRoadLabel = new JLabel("Road");
    JTextField shotLocRoadField = createMvTextField("shotLocation.road", 30);
    JLabel shotLocSuburbLabel = new JLabel("Suburb");
    JTextField shotLocSuburbField = createMvTextField("shotLocation.suburb", 30);
    JLabel shotLocCityLabel = new JLabel("City");
    JTextField shotLocCityField = createMvTextField("shotLocation.city", 30);
    JLabel shotLocCountryLabel = new JLabel("Country");
    JTextField shotLocCountryField = createMvTextField("shotLocation.country", 30);
    JLabel shotLocGeohashLabel = new JLabel("Geohash code");
    JTextField shotLocGeohashField = createMvTextField("shotLocation.geoHashString", 30);
    shotLocGeohashField.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), "fillAddress");
    shotLocGeohashField.getActionMap().put("fillAddress", new FindAddressAction(ctrl));

    // Tags// ww  w.  j  a v  a  2  s  .co  m
    JLabel tagLabel = new JLabel("Tags");
    tagList = new TagList2(ctrl.getTagController());
    tagList.setBackground(generalPane.getBackground());

    // Description text
    JLabel descLabel = new JLabel("Description");
    descriptionTextArea = new JTextArea(5, 40);
    descriptionTextArea.setLineWrap(true);
    descriptionTextArea.setWrapStyleWord(true);
    JScrollPane descScrollPane = new JScrollPane(descriptionTextArea);
    descScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    Border descBorder = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
    descBorder = BorderFactory.createTitledBorder(descBorder, "Description");
    descScrollPane.setBorder(descBorder);
    descriptionDoc = descriptionTextArea.getDocument();
    descriptionDoc.putProperty(FIELD, PhotoInfoFields.DESCRIPTION);
    descriptionDoc.addDocumentListener(this);

    // Lay out the created controls
    GridBagLayout layout = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();
    generalPane.setLayout(layout);
    JLabel[] labels = { photographerLabel, fuzzyDateLabel, shootingPlaceLabel, shotLocGeohashLabel,
            shotLocRoadLabel, shotLocSuburbLabel, shotLocCityLabel, shotLocCountryLabel, qualityLabel,
            tagLabel };
    JComponent[] fields = { photographerField, fuzzyDateField, shootingPlaceField, shotLocGeohashField,
            shotLocRoadField, shotLocSuburbField, shotLocCityField, shotLocCountryField, qualityStars,
            tagList };
    addLabelTextRows(labels, fields, layout, generalPane);
    c = layout.getConstraints(tagList);
    c.fill = GridBagConstraints.HORIZONTAL;
    c.weightx = 0.0;
    c.weighty = 1.0;
    layout.setConstraints(tagList, c);

    generalPane.add(descScrollPane);
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.weighty = 0.5;
    c.fill = GridBagConstraints.BOTH;
    layout.setConstraints(descScrollPane, c);

    c = new GridBagConstraints();
    c.gridwidth = 1;
    c.weighty = 0;
    c.fill = GridBagConstraints.NONE;
    c.gridy = GridBagConstraints.RELATIVE;

    c.gridy = GridBagConstraints.RELATIVE;

    createTechDataUI();
    createFolderPaneUI();
    createRightsUI();
}

From source file:org.richie.codeGen.ui.CodeGenMainUI.java

public JTabbedPane getCenterPanel() {
    if (centerPanel == null) {
        centerPanel = new JTabbedPane();
        centerPanel.add(getTableSelectPanel(), "");
        centerPanel.add(getGenAndPreviewPanel(), "??");
    }/*from  w  w  w  . ja v a 2s.c o  m*/
    return centerPanel;
}

From source file:org.richie.codeGen.ui.GenAndPreviewUI.java

public JTabbedPane getMainPanel() {
    if (mainPanel == null) {
        mainPanel = new JTabbedPane();
        mainPanel.setTabPlacement(JTabbedPane.BOTTOM);
        mainPanel.add(getGenPanel(), "??");
    }/* w ww  . j a v a 2  s . c  o  m*/
    return mainPanel;
}

From source file:org.sikuli.ide.SikuliIDE.java

private void initMsgPane(boolean atBottom) {
    msgPane = new JTabbedPane();
    _console = new EditorConsolePane();
    msgPane.addTab(_I("paneMessage"), null, _console, "DoubleClick to hide/unhide");
    if (Settings.isWindows() || Settings.isLinux()) {
        msgPane.setBorder(BorderFactory.createEmptyBorder(5, 8, 5, 8));
    }/*from w  ww  . j ava 2  s  .c  om*/
    msgPane.addMouseListener(new MouseListener() {
        @Override
        public void mouseClicked(MouseEvent me) {
            if (me.getClickCount() < 2) {
                return;
            }
            if (msgPaneCollapsed) {
                _mainSplitPane.setDividerLocation(_mainSplitPane.getLastDividerLocation());
                msgPaneCollapsed = false;
            } else {
                int pos = _mainSplitPane.getWidth() - 35;
                if (prefs.getPrefMoreMessage() == PreferencesUser.HORIZONTAL) {
                    pos = _mainSplitPane.getHeight() - 35;
                }
                _mainSplitPane.setDividerLocation(pos);
                msgPaneCollapsed = true;
            }
        }
        //<editor-fold defaultstate="collapsed" desc="mouse events not used">

        @Override
        public void mousePressed(MouseEvent me) {
        }

        @Override
        public void mouseReleased(MouseEvent me) {
        }

        @Override
        public void mouseEntered(MouseEvent me) {
        }

        @Override
        public void mouseExited(MouseEvent me) {
        }
        //</editor-fold>
    });
}

From source file:org.springframework.richclient.factory.DefaultComponentFactory.java

public JTabbedPane createTabbedPane() {
    return new JTabbedPane();
}

From source file:org.stanwood.swing.AboutDialog.java

public void init() {
    Box box = Box.createVerticalBox();
    if (icon == null) {
        createTitleArea(box, title, version);
    } else {/*ww  w  . j ava2s  .  c om*/
        Box hbox = Box.createHorizontalBox();
        hbox.add(Box.createHorizontalStrut(40));
        hbox.add(new JLabel(icon));
        hbox.add(Box.createHorizontalStrut(10));
        box.add(hbox);
        Box vbox = Box.createVerticalBox();
        createTitleArea(vbox, title, version);
        hbox.add(vbox);
        hbox.add(Box.createHorizontalGlue());
    }

    JTabbedPane infoTabbedPane = new JTabbedPane();
    infoTabbedPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    JComponent tabAbout = createAboutTab();
    infoTabbedPane.addTab("About", tabAbout);
    JComponent tabAuthors = createAuthorsTab();
    infoTabbedPane.addTab("Authors", tabAuthors);
    box.add(infoTabbedPane);
    createButtonPane(box);

    setContentPane(box);
    setSize(450, 280);
    setLocationRelativeTo(getParent());
}