Example usage for java.awt GridBagConstraints WEST

List of usage examples for java.awt GridBagConstraints WEST

Introduction

In this page you can find the example usage for java.awt GridBagConstraints WEST.

Prototype

int WEST

To view the source code for java.awt GridBagConstraints WEST.

Click Source Link

Document

Put the component on the left side of its display area, centered vertically.

Usage

From source file:org.languagetool.gui.ConfigurationDialog.java

@NotNull
private JPanel getMotherTonguePanel(GridBagConstraints cons) {
    JPanel motherTonguePanel = new JPanel();
    if (insideOffice) {
        motherTonguePanel.setLayout(new GridBagLayout());
        GridBagConstraints cons1 = new GridBagConstraints();
        cons1.insets = new Insets(0, 0, 0, 0);
        cons1.gridx = 0;/*from ww  w  . j ava  2  s. com*/
        cons1.gridy = 0;
        cons1.anchor = GridBagConstraints.WEST;
        cons1.fill = GridBagConstraints.NONE;
        cons1.weightx = 0.0f;
        JRadioButton[] radioButtons = new JRadioButton[2];
        ButtonGroup numParaGroup = new ButtonGroup();
        radioButtons[0] = new JRadioButton(Tools.getLabel(messages.getString("guiUseDocumentLanguage")));
        radioButtons[0].setActionCommand("DocLang");
        radioButtons[0].setSelected(true);

        radioButtons[1] = new JRadioButton(Tools.getLabel(messages.getString("guiSetLanguageTo")));
        radioButtons[1].setActionCommand("SelectLang");

        JComboBox<String> motherTongueBox = new JComboBox<>(getPossibleMotherTongues());
        if (config.getMotherTongue() != null) {
            motherTongueBox.setSelectedItem(config.getMotherTongue().getTranslatedName(messages));
        }
        motherTongueBox.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    Language motherTongue;
                    if (motherTongueBox.getSelectedItem() instanceof String) {
                        motherTongue = getLanguageForLocalizedName(
                                motherTongueBox.getSelectedItem().toString());
                    } else {
                        motherTongue = (Language) motherTongueBox.getSelectedItem();
                    }
                    config.setMotherTongue(motherTongue);
                    config.setUseDocLanguage(false);
                    radioButtons[1].setSelected(true);
                }
            }
        });

        for (int i = 0; i < 2; i++) {
            numParaGroup.add(radioButtons[i]);
        }

        if (config.getUseDocLanguage()) {
            radioButtons[0].setSelected(true);
        } else {
            radioButtons[1].setSelected(true);
        }

        radioButtons[0].addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                config.setUseDocLanguage(true);
            }
        });

        radioButtons[1].addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                config.setUseDocLanguage(false);
                Language motherTongue;
                if (motherTongueBox.getSelectedItem() instanceof String) {
                    motherTongue = getLanguageForLocalizedName(motherTongueBox.getSelectedItem().toString());
                } else {
                    motherTongue = (Language) motherTongueBox.getSelectedItem();
                }
                config.setMotherTongue(motherTongue);
            }
        });
        motherTonguePanel.add(radioButtons[0], cons1);
        cons1.gridy++;
        motherTonguePanel.add(radioButtons[1], cons1);
        cons1.gridx = 1;
        motherTonguePanel.add(motherTongueBox, cons1);
    } else {
        motherTonguePanel.add(new JLabel(messages.getString("guiMotherTongue")), cons);
        JComboBox<String> motherTongueBox = new JComboBox<>(getPossibleMotherTongues());
        if (config.getMotherTongue() != null) {
            motherTongueBox.setSelectedItem(config.getMotherTongue().getTranslatedName(messages));
        }
        motherTongueBox.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    Language motherTongue;
                    if (motherTongueBox.getSelectedItem() instanceof String) {
                        motherTongue = getLanguageForLocalizedName(
                                motherTongueBox.getSelectedItem().toString());
                    } else {
                        motherTongue = (Language) motherTongueBox.getSelectedItem();
                    }
                    config.setMotherTongue(motherTongue);
                }
            }
        });
        motherTonguePanel.add(motherTongueBox, cons);
    }
    return motherTonguePanel;
}

From source file:org.pentaho.reporting.ui.datasources.mondrian.MondrianDataSourceEditor.java

private JPanel createConnectionTopPanel() {
    final JPanel masterPanel = new JPanel();
    masterPanel.setLayout(new GridBagLayout());

    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 0;/*w  ww . jav  a  2  s .co m*/
    gbc.gridy = 0;
    gbc.gridwidth = 4;
    gbc.anchor = GridBagConstraints.WEST;
    masterPanel.add(new JLabel(Messages.getString("MondrianDataSourceEditor.SchemaFileLabel")), gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 1;
    gbc.gridwidth = 1;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    masterPanel.add(filenameField, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 1;
    gbc.gridwidth = 1;
    gbc.anchor = GridBagConstraints.WEST;
    masterPanel.add(new JButton(new BrowseAction()), gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 2;
    gbc.gridy = 1;
    gbc.gridwidth = 1;
    gbc.anchor = GridBagConstraints.WEST;
    masterPanel.add(Box.createHorizontalStrut(20), gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 3;
    gbc.gridy = 1;
    gbc.gridwidth = 1;
    gbc.anchor = GridBagConstraints.WEST;
    masterPanel.add(new JButton(new EditSecurityAction()), gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 2;
    gbc.gridwidth = 4;
    gbc.anchor = GridBagConstraints.WEST;
    masterPanel.add(new JLabel(Messages.getString("MondrianDataSourceEditor.CubeConnectionName")), gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 3;
    gbc.gridwidth = 1;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 5;
    masterPanel.add(cubeConnectionNameField, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 3;
    gbc.gridwidth = 3;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    masterPanel.add(new JButton(new RefreshSchemaNameAction()), gbc);

    return masterPanel;
}

From source file:org.bigwiv.blastgraph.gui.BlastGraphFrame.java

private void initComponents() {

    URL icon;// w  ww . j  a  v a2 s  .co m
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/icon.png");
    this.setIconImage(Toolkit.getDefaultToolkit().createImage(icon));
    JComponent pane;
    pane = (JComponent) getContentPane();

    // ====================Menu Setting=======================
    newItem = new JMenuItem("New From Blast");
    newItem.setMnemonic('n');
    newItem.addActionListener(commandActionListener);

    openItem = new JMenuItem("Open");
    openItem.setMnemonic('o');
    openItem.addActionListener(commandActionListener);

    appendGraphItem = new JMenuItem("Append Graph");
    appendGraphItem.setMnemonic('a');
    appendGraphItem.addActionListener(commandActionListener);

    saveItem = new JMenuItem("Save");
    saveItem.setMnemonic('s');
    saveItem.addActionListener(commandActionListener);

    saveAsGraphItem = new JMenuItem("Save As");
    saveAsGraphItem.addActionListener(commandActionListener);

    exportGraphItem = new JMenuItem("Export");
    exportGraphItem.addActionListener(commandActionListener);

    saveCurGraphItem = new JMenuItem("Save Current Graph");
    saveCurGraphItem.addActionListener(commandActionListener);

    saveCurImgItem = new JMenuItem("Save Image");
    saveCurImgItem.addActionListener(commandActionListener);

    saveAllVertexAttrItem = new JMenuItem("Save Vertex Attribute");
    saveAllVertexAttrItem.addActionListener(commandActionListener);

    saveCurVertexAttrItem = new JMenuItem("Save Vertex Attribute");
    saveCurVertexAttrItem.addActionListener(commandActionListener);

    saveAsMenu = new JMenu("Save As");
    saveAsMenu.add(saveAsGraphItem);
    saveAsMenu.add(saveAllVertexAttrItem);

    saveCurGraphMenu = new JMenu("Save Current Graph");
    saveCurGraphMenu.add(saveCurGraphItem);
    saveCurGraphMenu.add(saveCurImgItem);
    saveCurGraphMenu.add(saveCurVertexAttrItem);

    printItem = new JMenuItem("Print...");
    printItem.setMnemonic('p');
    printItem.addActionListener(commandActionListener);

    importVertexAttrItem = new JMenuItem("Import Vertex Attribute");
    importVertexAttrItem.addActionListener(commandActionListener);

    closeItem = new JMenuItem("Close");
    closeItem.setMnemonic('c');
    closeItem.addActionListener(commandActionListener);

    exitItem = new JMenuItem("Exit");
    exitItem.setMnemonic('x');
    exitItem.addActionListener(commandActionListener);

    fileMenu = new JMenu("File");
    fileMenu.setMnemonic('f');
    fileMenu.add(newItem);
    fileMenu.add(openItem);
    fileMenu.add(appendGraphItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(closeItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(saveItem);
    fileMenu.add(saveAsMenu);
    fileMenu.add(saveCurGraphMenu);
    fileMenu.add(new JSeparator());
    fileMenu.add(printItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(importVertexAttrItem);
    fileMenu.add(exportGraphItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(exitItem);

    // edit menu
    undoItem = new JMenuItem("Undo");
    redoItem = new JMenuItem("Redo");
    Global.COMMAND_MANAGER.registerUndoRedoItem(undoItem, redoItem);
    removeSingleItem = new JMenuItem("Remove Single Vertices");
    removeSingleItem.addActionListener(commandActionListener);
    filterItem = new JMenuItem("Filt Graph");
    filterItem.addActionListener(commandActionListener);
    settingItem = new JMenuItem("Setting");
    settingItem.addActionListener(commandActionListener);

    markovClusterItem = new JMenuItem("Markov Cluster");
    markovClusterItem.addActionListener(commandActionListener);

    // genomeNumFiltItem = new JMenuItem("GenomeNum Filt");
    // genomeNumFiltItem.addActionListener(commandActionListener);

    // removeSingleLinkageItem = new JMenuItem("Remove Single Linkage");
    // removeSingleLinkageItem.addActionListener(commandActionListener);

    editMenu = new JMenu("Edit");
    editMenu.setMnemonic('e');
    editMenu.add(undoItem);
    editMenu.add(redoItem);
    editMenu.add(filterItem);
    editMenu.add(markovClusterItem);
    editMenu.add(removeSingleItem);
    // editMenu.add(genomeNumFiltItem);
    // editMenu.add(removeSingleLinkageItem);
    editMenu.add(settingItem);

    // Tools Item
    geneContentItem = new JMenuItem("Gene Content Table");
    geneContentItem.addActionListener(commandActionListener);

    batchSaveItem = new JMenuItem("Batch Save");
    batchSaveItem.addActionListener(commandActionListener);

    mstItem = new JMenuItem("Minimum Spanning Tree");
    mstItem.addActionListener(commandActionListener);

    viewNeighborItem = new JMenuItem("View Neighbor of...");
    viewNeighborItem.addActionListener(commandActionListener);

    //
    // tempWorkItem = new JMenuItem("Temp Work");
    // tempWorkItem.addActionListener(commandActionListener);

    toolsMenu = new JMenu("Tools");
    toolsMenu.setMnemonic('t');
    toolsMenu.add(geneContentItem);
    toolsMenu.add(viewNeighborItem);
    toolsMenu.add(mstItem);
    toolsMenu.add(batchSaveItem);
    // toolsMenu.add(tempWorkItem);

    // graph Menu
    graphMenu = new JMenu("Graph");
    previousItem = new JMenuItem("Previous");
    previousItem.addActionListener(commandActionListener);
    nextItem = new JMenuItem("Next");
    nextItem.addActionListener(commandActionListener);
    resortItem = new JMenuItem("Resort graphs");
    resortItem.addActionListener(commandActionListener);

    graphMenu.add(nextItem);
    graphMenu.add(previousItem);
    graphMenu.add(resortItem);

    // help Menu
    helpContentItem = new JMenuItem("Online Manual");
    helpContentItem.addActionListener(commandActionListener);
    aboutItem = new JMenuItem("About BlastGraph");
    aboutItem.addActionListener(commandActionListener);

    helpMenu = new JMenu("Help");
    helpMenu.add(helpContentItem);
    helpMenu.add(aboutItem);

    // menu bar
    menuBar = new JMenuBar();
    menuBar.add(fileMenu);
    menuBar.add(editMenu);
    menuBar.add(graphMenu);
    menuBar.add(toolsMenu);
    menuBar.add(helpMenu);

    setJMenuBar(menuBar);

    // ===================mainPanel Setting===================
    GridBagManager.reset();
    GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
    GridBagManager.GRID_BAG.anchor = GridBagConstraints.FIRST_LINE_START;
    GridBagManager.GRID_BAG.weightx = 0;
    GridBagManager.GRID_BAG.weighty = 0;
    GridBagManager.GRID_BAG.insets = new Insets(2, 2, 1, 1);

    mainPanel = new JPanel();
    mainPanel.setLayout(new BorderLayout());
    pane.add(mainPanel);

    hsplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    hsplitPane.setContinuousLayout(true);
    hsplitPane.setOneTouchExpandable(true);
    hsplitPane.setResizeWeight(0.9);

    // ===================toolBarPanel Setting===================

    // graph file toolbar
    fileToolBar = new JToolBar();
    fileToolBar.setRollover(true);
    newButton = new JButton();
    newButton.setBorderPainted(false);
    newButton.setMnemonic('n');
    newButton.setToolTipText("New From Blast");
    newButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/filenew.png");
    // System.out.println(icon);
    newButton.setIcon(new ImageIcon(icon));

    openButton = new JButton();
    openButton.setBorderPainted(false);
    openButton.setMnemonic('o');
    openButton.setToolTipText("Open");
    openButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/fileopen.png");
    openButton.setIcon(new ImageIcon(icon));

    saveButton = new JButton();
    saveButton.setBorderPainted(false);
    saveButton.setMnemonic('s');
    saveButton.setToolTipText("Save");
    saveButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/filesave.png");
    saveButton.setIcon(new ImageIcon(icon));

    saveCurImgButton = new JButton();
    saveCurImgButton.setBorderPainted(false);
    saveCurImgButton.setToolTipText("Save current image");
    saveCurImgButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/saveimage.png");
    saveCurImgButton.setIcon(new ImageIcon(icon));

    printButton = new JButton();
    printButton.setBorderPainted(false);
    printButton.setToolTipText("Print...");
    printButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/fileprint.png");
    printButton.setIcon(new ImageIcon(icon));

    fileToolBar.add(newButton);
    fileToolBar.add(openButton);
    fileToolBar.add(saveButton);
    fileToolBar.add(saveCurImgButton);
    fileToolBar.add(printButton);

    // graph control toolbar
    graphToolBar = new JToolBar();
    graphToolBar.setRollover(true);

    previousButton = new JButton();
    previousButton.setBorderPainted(false);
    previousButton.setToolTipText("Previous graph");
    previousButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/previous.png");
    previousButton.setIcon(new ImageIcon(icon));

    indexField = new JTextField();
    indexField.setSize(new Dimension(25, 16));
    indexField.setMinimumSize(new Dimension(25, 16));
    indexField.setPreferredSize(new Dimension(25, 16));
    indexField.addKeyListener(keyListener);

    nextButton = new JButton();
    nextButton.setBorderPainted(false);
    nextButton.setToolTipText("Next graph");
    nextButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/next.png");
    nextButton.setIcon(new ImageIcon(icon));

    filterButton = new JButton();
    filterButton.setBorderPainted(false);
    filterButton.setToolTipText("Filt graph");
    filterButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/filter.png");
    filterButton.setIcon(new ImageIcon(icon));

    resortButton = new JButton();
    resortButton.setBorderPainted(false);
    resortButton.setToolTipText("Resort graph");
    resortButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/resort.png");
    resortButton.setIcon(new ImageIcon(icon));

    searchField = new JTextField();
    searchField.setSize(new Dimension(60, 16));
    searchField.setMinimumSize(new Dimension(60, 16));
    searchField.setPreferredSize(new Dimension(60, 16));
    searchField.addKeyListener(keyListener);

    searchButton = new JButton();
    searchButton.setBorderPainted(false);
    searchButton.setToolTipText("Search");
    searchButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/search.png");
    searchButton.setIcon(new ImageIcon(icon));

    graphToolBar.add(filterButton);
    graphToolBar.add(resortButton);
    // graphToolBar.add(new JToolBar.Separator());
    graphToolBar.add(previousButton);
    graphToolBar.add(indexField);
    graphToolBar.add(nextButton);
    graphToolBar.add(searchField);
    graphToolBar.add(searchButton);

    // view toolbar (modebox & layoutbox)
    viewToolBar = new JToolBar();
    viewToolBar.setRollover(true);
    modeBox = graphMouse.getModeComboBox();
    modeBox.addItemListener(new ItemListener() {

        @Override
        public void itemStateChanged(ItemEvent e) {
            int index = modeBox.getSelectedIndex();
            if (index == 2) {
                int annotCount = annotationToolBar.getComponentCount();
                for (int i = 0; i < annotCount; i++) {
                    annotationToolBar.getComponent(i).setEnabled(true);
                }
            } else {
                int annotCount = annotationToolBar.getComponentCount();
                for (int i = 0; i < annotCount; i++) {
                    annotationToolBar.getComponent(i).setEnabled(false);
                }
            }

        }
    });
    layoutBox = this.getLayoutComboBox();
    viewToolBar.add(modeBox);
    viewToolBar.add(layoutBox);

    colorComboBox = new JComboBox(new String[] { "vertex color", "index", "strand", "genomeAcc", "organism" });
    viewToolBar.add(colorComboBox);

    // add additional menu to graphMenu
    modeMenu = graphMouse.getModeMenu();
    modeMenu.setText("Mode");
    layoutMenu = getLayoutMenu();
    layoutMenu.setText("Layout");
    graphMenu.add(modeMenu);
    graphMenu.add(layoutMenu);

    // annotation toolbar
    AnnotationControls<HitVertex, ValueEdge> annotationControls = new AnnotationControls<HitVertex, ValueEdge>(
            annotatingPlugin);
    annotationToolBar = annotationControls.getAnnotationsToolBar();
    ((JButton) annotationToolBar.getComponent(1)).setBorderPainted(false);
    ((JToggleButton) annotationToolBar.getComponent(2)).setBorderPainted(false);

    // add toolbars to toolBarPanel
    toolBarPanel = new JPanel();
    toolBarPanel.setLayout(new ModifiedFlowLayout(ModifiedFlowLayout.LEFT, 0, 0));
    toolBarPanel.setBorder(new EtchedBorder());
    toolBarPanel.add(fileToolBar);
    toolBarPanel.add(graphToolBar);
    toolBarPanel.add(viewToolBar);
    toolBarPanel.add(annotationToolBar);

    mainPanel.add(toolBarPanel, BorderLayout.NORTH);
    mainPanel.add(hsplitPane, BorderLayout.CENTER);

    // GridBagManager.add(mainPanel, toolBarPanel, 0, 0, 1, 1);
    // GridBagManager.add(mainPanel, hsplitPane, 0, 1, 1, 1);

    // mainPanel.add(toolBarPanel, BorderLayout.NORTH);

    // ===================vsplitPane Setting=================
    vsplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    vsplitPane.setContinuousLayout(true);
    vsplitPane.setOneTouchExpandable(true);
    vsplitPane.setResizeWeight(0.9);

    hsplitPane.setLeftComponent(vsplitPane);
    // GridBagManager.GRID_BAG.weightx = 0.9;
    // GridBagManager.GRID_BAG.weighty = 1;
    // GridBagManager.add(mainPanel, vsplitPane, 0, 1, 1, 2);
    // mainPanel.add(vsplitPane, BorderLayout.CENTER);

    // ===================vvPanel Setting===================

    vvPanel = new GraphZoomScrollPane(vv);
    vsplitPane.setTopComponent(vvPanel);

    // ===================Tab Panel Setting=======================
    // progressPanel = new ProgressPanel();

    verticesTable = new VerticesTable();
    verticesTable.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseClicked(MouseEvent e) {
            int row = verticesTable.rowAtPoint(e.getPoint());
            int col = verticesTable.columnAtPoint(e.getPoint());
            // System.out.println(row + " " + col);
            String value = verticesTable.getValueAt(row, col).toString();
            // System.out.println(value);
            if (Global.graph.containsVertex(new HitVertex(value))) {
                for (int i = 0; i < subSetList.size(); i++) {
                    if (subSetList.get(i).contains(new HitVertex(value))) {
                        curGraph = FilterUtils.createInducedSubgraph(subSetList.get(i), Global.graph);
                        PickedState<HitVertex> pickedVertexState = vv.getPickedVertexState();

                        // picked is a reference to picked vertices
                        // use a temp set to avoid concurrent modification
                        Set<HitVertex> picked = pickedVertexState.getPicked();
                        Set<HitVertex> temp = new HashSet<HitVertex>();
                        for (HitVertex hitVertex : picked) {
                            temp.add(hitVertex);
                        }
                        for (HitVertex hv : temp) {
                            pickedVertexState.pick(hv, false);
                        }

                        pickedVertexState.pick(new HitVertex(value), true);
                        // refreshSubGraphView();
                        return;
                    }
                }
            }
        }
    });

    verticesTable.addMouseMotionListener(new MouseMotionAdapter() {
        @Override
        public void mouseMoved(MouseEvent e) {
            int row = verticesTable.rowAtPoint(e.getPoint());
            int col = verticesTable.columnAtPoint(e.getPoint());
            String value = verticesTable.getValueAt(row, col).toString();
            // System.out.println(value);
            if (Global.graph.containsVertex(value)) {
                Cursor normalCursor = new Cursor(Cursor.HAND_CURSOR);
                setCursor(normalCursor);
            } else {
                Cursor normalCursor = new Cursor(Cursor.DEFAULT_CURSOR);
                setCursor(normalCursor);
            }
        }
    });
    verticesPanel = new JPanel();
    verticesPanel.setLayout(new GridLayout());
    verticesPanel.add(new JScrollPane(verticesTable));

    edgesTable = new EdgesTable();
    edgesPanel = new JPanel();
    edgesPanel.setLayout(new GridLayout());
    edgesPanel.add(new JScrollPane(edgesTable));

    tabbedPane = new JTabbedPane();
    tabbedPane.addTab("Vertices", verticesPanel);
    tabbedPane.addTab("Edges", edgesPanel);
    vsplitPane.setBottomComponent(tabbedPane);

    graphMouse.addPichedChangeListener(verticesTable, edgesTable);

    // ===================Info Panel Setting===================
    infoPanel = new JPanel(new GridBagLayout());
    GridBagManager.GRID_BAG.weightx = 0.1;
    GridBagManager.GRID_BAG.weighty = 1;
    hsplitPane.setRightComponent(infoPanel);

    JPanel mainInfoPanel = new JPanel(new GridBagLayout());
    mainInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Main Info"));

    JPanel currentInfoPanel = new JPanel(new GridBagLayout());
    currentInfoPanel.setBorder(
            BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Current Graph"));
    JPanel selectedInfoPanel = new JPanel(new GridBagLayout());
    selectedInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Selected"));

    JPanel statisticsInfoPanel = new JPanel(new GridBagLayout());
    statisticsInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Statistics"));

    JPanel progressInfoPanel = new JPanel(new GridBagLayout());
    progressInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Progress"));

    GridBagManager.GRID_BAG.anchor = GridBagConstraints.NORTH;
    GridBagManager.GRID_BAG.fill = GridBagConstraints.HORIZONTAL;
    GridBagManager.GRID_BAG.weighty = 0;
    GridBagManager.add(infoPanel, mainInfoPanel, 0, 1, 1, 1);
    GridBagManager.add(infoPanel, currentInfoPanel, 0, 2, 1, 1);
    GridBagManager.add(infoPanel, selectedInfoPanel, 0, 3, 1, 1);
    GridBagManager.GRID_BAG.weighty = 0.5;
    GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
    GridBagManager.add(infoPanel, statisticsInfoPanel, 0, 4, 1, 1);
    GridBagManager.add(infoPanel, progressInfoPanel, 0, 5, 1, 1);

    // mainInfoPanel
    {
        JLabel vertices = new JLabel("Vertices:");
        vertexCountLabel = new JLabel("0");
        JLabel edges = new JLabel("Edges:");
        edgeCountLabel = new JLabel("0");
        JLabel subGraphs = new JLabel("SubGraphs:");
        subGraphCountLabel = new JLabel("0");
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.WEST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(mainInfoPanel, vertices, 0, 0, 1, 1);
        GridBagManager.add(mainInfoPanel, edges, 0, 1, 1, 1);
        GridBagManager.add(mainInfoPanel, subGraphs, 0, 2, 1, 1);
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.EAST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(mainInfoPanel, vertexCountLabel, 1, 0, 1, 1);
        GridBagManager.add(mainInfoPanel, edgeCountLabel, 1, 1, 1, 1);
        GridBagManager.add(mainInfoPanel, subGraphCountLabel, 1, 2, 1, 1);

    } // end of mainInfoPanel

    // currentInfoPanel
    {
        JLabel vertices = new JLabel("Vertices:");
        currentVertexCountLabel = new JLabel("0");

        JLabel edges = new JLabel("Edges:");
        currentEdgeCountLabel = new JLabel("0");

        JLabel acc = new JLabel("ACC:");
        currentAccLabel = new JLabel("0");

        GridBagManager.GRID_BAG.anchor = GridBagConstraints.WEST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(currentInfoPanel, vertices, 0, 0, 1, 1);
        GridBagManager.add(currentInfoPanel, edges, 0, 1, 1, 1);
        GridBagManager.add(currentInfoPanel, acc, 0, 2, 1, 1);
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.EAST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(currentInfoPanel, currentVertexCountLabel, 1, 0, 1, 1);
        GridBagManager.add(currentInfoPanel, currentEdgeCountLabel, 1, 1, 1, 1);
        GridBagManager.add(currentInfoPanel, currentAccLabel, 1, 2, 1, 1);

    } // end of currentInfoPanel

    // selectedInfoPanel
    {
        JLabel vertices = new JLabel("Vertices:");
        selectedVertexCountLabel = new JLabel("0");
        JLabel edges = new JLabel("Edges:");
        selectedEdgeCountLabel = new JLabel("0");
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.WEST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(selectedInfoPanel, vertices, 0, 0, 1, 1);
        GridBagManager.add(selectedInfoPanel, edges, 0, 1, 1, 1);
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.EAST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(selectedInfoPanel, selectedVertexCountLabel, 1, 0, 1, 1);
        GridBagManager.add(selectedInfoPanel, selectedEdgeCountLabel, 1, 1, 1, 1);
        CollectionChangeListener<HitVertex> svListener = new CollectionChangeListener<HitVertex>() {

            @Override
            public void onCollectionChange(Set<HitVertex> set) {
                selectedVertexCountLabel.setText("" + set.size());
            }
        };

        CollectionChangeListener<ValueEdge> veListener = new CollectionChangeListener<ValueEdge>() {

            @Override
            public void onCollectionChange(Set<ValueEdge> set) {
                selectedEdgeCountLabel.setText("" + set.size());
            }
        };

        graphMouse.addPichedChangeListener(svListener, veListener);

    } // end of selectedInfoPanel

    {// statistics Panel
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.NORTH;
        GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
        GridBagManager.add(statisticsInfoPanel, graphStatisticsPanel, 0, 0, 1, 1);
    } // statistics Panel

    {// progressInfoPanel
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.NORTH;
        GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
        GridBagManager.add(progressInfoPanel, progressPanel, 0, 0, 1, 1);
    } // progressInfoPanel
      // set frame size
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    setSize((screen.width * 3) / 4, (screen.height * 9) / 10);
    setLocation(screen.width / 6, screen.height / 16);

    refreshUI(false);
}

From source file:com.rapidminer.gui.new_plotter.gui.ColorSchemeDialog.java

/**
 * @return//  w w w .j  a  va2s.c om
 */
private JPanel createSchemeComboBoxPanel() {
    JPanel schemeListPanel = new JPanel(new GridBagLayout());

    // create categories configuration panel
    {

        GridBagConstraints itemConstraint = new GridBagConstraints();

        // Add active scheme label
        JLabel actviceSchemeLabel = new ResourceLabel(
                "plotter.configuration_dialog.color_scheme_dialog.active_scheme");
        {
            itemConstraint.fill = GridBagConstraints.HORIZONTAL;
            itemConstraint.anchor = GridBagConstraints.WEST;
            itemConstraint.gridwidth = GridBagConstraints.RELATIVE;
            itemConstraint.insets = new Insets(0, 5, 5, 5);
            itemConstraint.weightx = 1.0;

            actviceSchemeLabel.setBackground(Color.red);

            schemeListPanel.add(actviceSchemeLabel, itemConstraint);
        }

        // add button panel
        {
            JPanel buttonPanel = new JPanel(new GridBagLayout());

            // rename scheme button
            {
                renameSchemeButton = new JButton(new ResourceAction(true,
                        "plotter.configuration_dialog.color_scheme_dialog.rename_scheme_button") {

                    private static final long serialVersionUID = 1L;

                    @Override
                    public void actionPerformed(ActionEvent e) {
                        String newName = createNameDialog(currentActiveColorSchemeName);
                        if (newName != null && !newName.equals(currentActiveColorSchemeName)) {
                            renameColorSchemeAction(newName);
                        }
                    }

                });

                itemConstraint = new GridBagConstraints();
                itemConstraint.gridwidth = GridBagConstraints.RELATIVE;
                itemConstraint.fill = GridBagConstraints.NONE;

                buttonPanel.add(renameSchemeButton, itemConstraint);
            }

            // remove scheme button
            {
                removeSchemeButton = new JButton(new ResourceAction(true,
                        "plotter.configuration_dialog.color_scheme_dialog.remove_scheme_button") {

                    private static final long serialVersionUID = 1L;

                    @Override
                    public void actionPerformed(ActionEvent e) {
                        ConfirmDialog dialog = new ConfirmDialog(
                                SwingUtilities.getWindowAncestor((Component) e.getSource()),
                                "plotter.configuration_dialog.confirm_color_scheme_delete",
                                ConfirmDialog.YES_NO_OPTION, false);
                        dialog.setLocationRelativeTo((Component) e.getSource());
                        dialog.setVisible(true);
                        if (dialog.getReturnOption() == ConfirmDialog.YES_OPTION) {
                            removeColorSchemeAction((ColorScheme) colorSchemeComboBox.getSelectedItem());
                        }
                    }

                });

                itemConstraint = new GridBagConstraints();
                itemConstraint.gridwidth = GridBagConstraints.REMAINDER;
                itemConstraint.fill = GridBagConstraints.NONE;

                buttonPanel.add(removeSchemeButton, itemConstraint);
            }

            itemConstraint = new GridBagConstraints();
            itemConstraint.gridwidth = GridBagConstraints.REMAINDER;
            itemConstraint.fill = GridBagConstraints.NONE;
            itemConstraint.anchor = GridBagConstraints.EAST;
            itemConstraint.insets = new Insets(0, 5, 5, 5);

            schemeListPanel.add(buttonPanel, itemConstraint);

        }

        {

            colorSchemeComboBox = new JComboBox(colorSchemeComboBoxModel);
            actviceSchemeLabel.setLabelFor(colorSchemeComboBox);
            colorSchemeComboBox.setRenderer(new ColorSchemeComboBoxRenderer());
            colorSchemeComboBox.addPopupMenuListener(new PopupMenuListener() {

                @Override
                public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                    return;

                }

                @Override
                public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
                    Object selectedValue = colorSchemeComboBox.getSelectedItem();
                    if (selectedValue instanceof ColorScheme) {
                        ColorScheme selection = (ColorScheme) selectedValue;
                        if (selection != null) {
                            if (!currentActiveColorSchemeName.equals(selection.getName())) {
                                currentActiveColorSchemeName = selection.getName();
                                adaptModels();
                            }
                        }
                    } else {
                        String newName = I18N.getGUILabel("plotter.new_color_scheme_name.label");
                        String suffix = "";
                        int counter = 1;
                        while (currentColorSchemes.get(newName + suffix) != null) {
                            suffix = "_" + counter;
                            counter++;
                        }
                        newName += suffix;
                        String userSelectedName = createNameDialog(newName);
                        if (userSelectedName == null) {
                            colorSchemeComboBox.setSelectedItem(getCurrentActiveColorScheme());
                            return;
                        }
                        addNewColorSchemeAction(userSelectedName);
                    }
                }

                @Override
                public void popupMenuCanceled(PopupMenuEvent e) {
                    return;
                }
            });

            itemConstraint = new GridBagConstraints();
            itemConstraint.fill = GridBagConstraints.BOTH;
            itemConstraint.weightx = 0.0;
            itemConstraint.weighty = 0.0;
            itemConstraint.gridwidth = GridBagConstraints.REMAINDER;

            schemeListPanel.add(colorSchemeComboBox, itemConstraint);
        }

    }
    return schemeListPanel;
}

From source file:lejos.pc.charting.LogChartFrame.java

/** All the setup of components, etc. What's scary is Swing is a "lightweight" GUI framework...
 * @throws Exception/*from   www.j  av  a2s.  com*/
 */
private void jbInit() throws Exception {
    this.setJMenuBar(menuBar);
    this.setSize(new Dimension(819, 613));
    this.setMinimumSize(new Dimension(819, 613));
    this.setTitle("NXT Charting Logger");
    this.setEnabled(true);
    // enforce minimum window size
    this.addComponentListener(new ComponentAdapter() {
        @Override
        public void componentResized(ComponentEvent e) {
            JFrame theFrame = (JFrame) e.getSource();
            Dimension d1 = theFrame.getMinimumSize();
            Dimension d2 = theFrame.getSize();
            boolean enforce = false;
            if (theFrame.getWidth() < d1.getWidth()) {
                d2.setSize(d1.getWidth(), d2.getHeight());
                enforce = true;
            }
            if (theFrame.getHeight() < d1.getHeight()) {
                d2.setSize(d2.getWidth(), d1.getHeight());
                enforce = true;
            }
            if (enforce)
                theFrame.setSize(d2);
        }
    });

    this.getContentPane().setLayout(gridBagLayout1);
    MenuActionListener menuItemActionListener = new MenuActionListener();
    MenuEventListener menuListener = new MenuEventListener();

    menu = new JMenu("Edit");
    menu.setMnemonic(KeyEvent.VK_E);
    menuBar.add(menu);
    menuItem = new JMenuItem("Copy Chart Image", KeyEvent.VK_I);
    menuItem.addActionListener(menuItemActionListener);
    menu.add(menuItem);
    menuItem = new JMenuItem("Copy Data Log", KeyEvent.VK_D);
    menuItem.addActionListener(menuItemActionListener);
    menu.add(menuItem);

    menu = new JMenu("View");
    menu.setMnemonic(KeyEvent.VK_V);
    menu.setActionCommand("VIEW_MENU");
    menu.addMenuListener(menuListener);
    menuBar.add(menu);
    menuItem = new JMenuItem("Expand Chart", KeyEvent.VK_F);
    menuItem.addActionListener(menuItemActionListener);
    menu.add(menuItem);
    menuItem = new JMenuItem("Chart in New Window", KeyEvent.VK_N);
    menuItem.addActionListener(menuItemActionListener);
    menu.add(menuItem);

    menu = new JMenu("Help");
    menu.setMnemonic(KeyEvent.VK_H);
    menuBar.add(menu);
    menuItem = new JMenuItem("Chart controls", KeyEvent.VK_C);
    menuItem.addActionListener(menuItemActionListener);
    menu.add(menuItem);
    menuItem = new JMenuItem("Generate sample data", KeyEvent.VK_G);
    menuItem.addActionListener(menuItemActionListener);
    menu.add(menuItem);
    menuItem = new JMenuItem("About", KeyEvent.VK_A);
    menuItem.addActionListener(menuItemActionListener);
    jTabbedPane1.setPreferredSize(new Dimension(621, 199));
    jTabbedPane1.setMinimumSize(new Dimension(621, 199));
    menu.add(menuItem);

    jButtonConnect.setText("Connect");
    jButtonConnect.setBounds(new Rectangle(25, 65, 115, 25));
    jButtonConnect.setToolTipText("Connect/disconnect toggle");
    jButtonConnect.setMnemonic('C');
    jButtonConnect.setSelected(true);
    jButtonConnect.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            jButtonConnect_actionPerformed(e);
        }
    });
    UIPanel.setSize(new Dimension(820, 200));
    UIPanel.setLayout(null);
    UIPanel.setPreferredSize(new Dimension(300, 200));
    UIPanel.setMinimumSize(new Dimension(300, 200));
    UIPanel.setBounds(new Rectangle(0, 350, 820, 200));
    UIPanel.setMaximumSize(new Dimension(300, 32767));
    connectionPanel.setBounds(new Rectangle(10, 10, 175, 100));
    connectionPanel.setBorder(BorderFactory.createTitledBorder("Connection"));
    connectionPanel.setLayout(null);
    connectionPanel.setFont(new Font("Tahoma", 0, 11));

    jLabel1logfilename.setText("Log File:");
    jLabel1logfilename.setBounds(new Rectangle(10, 125, 165, 20));
    jLabel1logfilename.setHorizontalTextPosition(SwingConstants.RIGHT);
    jLabel1logfilename.setHorizontalAlignment(SwingConstants.LEFT);
    jLabel1logfilename.setToolTipText("Specify the name of your log file here");

    jTextFieldNXTName.setBounds(new Rectangle(5, 40, 165, 20));
    jTextFieldNXTName.setToolTipText(
            "The name or Address of the NXT. Leave empty and the first one found will be used.");

    jTextFieldNXTName.requestFocus();

    jTextAreaStatus.setLineWrap(true);
    jTextAreaStatus.setFont(new Font("Tahoma", 0, 11));
    jTextAreaStatus.setWrapStyleWord(true);
    jTextAreaStatus.setBackground(SystemColor.window);

    dataLogTextArea.setLineWrap(false);
    dataLogTextArea.setFont(new Font("Tahoma", 0, 11));
    dataLogTextArea.setBackground(SystemColor.window);

    FQPathTextArea.setBounds(new Rectangle(5, 170, 185, 40));
    FQPathTextArea.setLineWrap(true);
    FQPathTextArea.setText(getCanonicalName(new File(".", "")));
    FQPathTextArea.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    FQPathTextArea.setRows(2);

    FQPathTextArea.setFont(new Font("Tahoma", 0, 9));
    FQPathTextArea.setOpaque(false);
    FQPathTextArea.setEditable(false);

    selectFolderButton.setText("Folder...");
    selectFolderButton.setBounds(new Rectangle(120, 125, 70, 20));
    selectFolderButton.setMargin(new Insets(1, 1, 1, 1));
    selectFolderButton.setFocusable(false);
    selectFolderButton.setMnemonic('F');
    selectFolderButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            selectFolderButton_actionPerformed(e);
        }
    });

    // domain display limits GUI
    chartOptionsPanel.setLayout(null);
    chartDomLimitsPanel.setBounds(new Rectangle(5, 35, 180, 135));
    chartDomLimitsPanel.setLayout(gridLayout1);
    chartDomLimitsPanel.setBorder(BorderFactory.createTitledBorder("Domain Display Limiting"));
    domainDisplayLimitSlider.setEnabled(false);
    domainDisplayLimitSlider.setMaximum(MAXDOMAIN_DATAPOINT_LIMIT);
    domainDisplayLimitSlider.setMinimum(MINDOMAIN_LIMIT);
    domainDisplayLimitSlider.setValue(MAXDOMAIN_DATAPOINT_LIMIT);
    domainDisplayLimitSlider.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            domainDisplayLimitSlider_stateChanged(e);
        }
    });
    useTimeRadioButton.setText("By Time");
    useTimeRadioButton.setEnabled(false);
    useTimeRadioButton.setMnemonic('I');
    useTimeRadioButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            domainDisplayLimitRadioButton_actionPerformed(e);
        }
    });
    useDataPointsRadioButton.setText("By Data Points");
    ButtonGroup bg1 = new ButtonGroup();
    bg1.add(useTimeRadioButton);
    bg1.add(useDataPointsRadioButton);
    useDataPointsRadioButton.setSelected(true);
    useDataPointsRadioButton.setEnabled(false);
    useDataPointsRadioButton.setMnemonic('P');
    useDataPointsRadioButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            domainDisplayLimitRadioButton_actionPerformed(e);
        }
    });
    datasetLimitEnableCheckBox.setText("Enable");
    datasetLimitEnableCheckBox.setRolloverEnabled(true);
    datasetLimitEnableCheckBox.setMnemonic('A');
    datasetLimitEnableCheckBox.setToolTipText("Enable Domain Clipping");
    datasetLimitEnableCheckBox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            datasetLimitEnableCheckBox_actionPerformed(e);
        }
    });
    domainLimitLabel.setText(String.format("%1$,d datapoints", MAXDOMAIN_DATAPOINT_LIMIT).toString());
    domainLimitLabel.setEnabled(false);
    gridLayout1.setRows(5);
    gridLayout1.setColumns(1);

    jLabel1.setText("Chart Title:");
    jLabel1.setBounds(new Rectangle(200, 10, 85, 20));
    jLabel1.setPreferredSize(new Dimension(115, 14));
    jLabel2.setText("Range Axis 1 Label:");
    jLabel2.setBounds(new Rectangle(200, 35, 115, 20));
    jLabel2.setSize(new Dimension(115, 20));
    jLabel3.setText("Range Axis 2 Label:");
    jLabel3.setBounds(new Rectangle(200, 60, 115, 20));
    jLabel3.setSize(new Dimension(115, 20));
    jLabel4.setText("Range Axis 3 Label:");
    jLabel4.setBounds(new Rectangle(200, 85, 115, 20));
    jLabel4.setSize(new Dimension(115, 20));
    jLabel6.setText("Range Axis 4 Label:");
    jLabel6.setBounds(new Rectangle(200, 110, 115, 20));
    jLabel6.setSize(new Dimension(115, 20));
    titleLabelChangeNotifier notifier = new titleLabelChangeNotifier();
    chartTitleTextField.setBounds(new Rectangle(315, 10, 290, 20));
    chartTitleTextField.getDocument().addDocumentListener(notifier);
    axis1LabelTextField.setBounds(new Rectangle(315, 35, 290, 20));
    axis1LabelTextField.getDocument().addDocumentListener(notifier);
    axis2LabelTextField.setBounds(new Rectangle(315, 60, 290, 20));
    axis2LabelTextField.getDocument().addDocumentListener(notifier);
    axis3LabelTextField.setBounds(new Rectangle(315, 85, 290, 20));
    axis3LabelTextField.getDocument().addDocumentListener(notifier);
    axis4LabelTextField.setBounds(new Rectangle(315, 110, 290, 20));
    showCommentsCheckBox.setText("Show Comment Markers");
    showCommentsCheckBox.setBounds(new Rectangle(200, 140, 185, 25));
    showCommentsCheckBox.setToolTipText("Show/Hide any comment markers on the chart");
    showCommentsCheckBox.setRolloverEnabled(true);
    showCommentsCheckBox.setSelected(true);
    showCommentsCheckBox.setMnemonic('M');
    showCommentsCheckBox.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            customChartPanel.setCommentsVisible(e.getStateChange() == ItemEvent.SELECTED);
        }
    });
    scrollDomainCheckBox.setText("Scroll Domain");
    scrollDomainCheckBox.setBounds(new Rectangle(10, 5, 175, 20));
    scrollDomainCheckBox.setSize(new Dimension(175, 25));
    scrollDomainCheckBox.setSelected(true);
    scrollDomainCheckBox.setMnemonic('O');
    scrollDomainCheckBox.setToolTipText("Checked to scroll domain as new data is received");
    scrollDomainCheckBox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            scrollDomainCheckBox_actionPerformed(e);
        }
    });
    axis4LabelTextField.getDocument().addDocumentListener(notifier);

    logFileTextField.setBounds(new Rectangle(10, 145, 180, 20));
    logFileTextField.setText("NXTData.txt");
    logFileTextField.setPreferredSize(new Dimension(180, 20));
    logFileTextField.setToolTipText("File name. Leave empty to not log to file.");
    statusScrollPane.setOpaque(false);
    dataLogScrollPane.setOpaque(false);

    customChartPanel.setMinimumSize(new Dimension(400, 300));
    customChartPanel.setPreferredSize(new Dimension(812, 400));

    jLabel5.setText("NXT Name/Address:");
    jLabel5.setBounds(new Rectangle(5, 20, 160, 20));
    jLabel5.setToolTipText(jTextFieldNXTName.getToolTipText());
    jLabel5.setHorizontalTextPosition(SwingConstants.RIGHT);
    jLabel5.setHorizontalAlignment(SwingConstants.LEFT);

    connectionPanel.add(jTextFieldNXTName, null);
    connectionPanel.add(jButtonConnect, null);
    connectionPanel.add(jLabel5, null);
    dataLogScrollPane.setViewportView(dataLogTextArea);
    jTabbedPane1.addTab("Data Log", dataLogScrollPane);
    statusScrollPane.setViewportView(jTextAreaStatus);
    jTabbedPane1.addTab("Status", statusScrollPane);
    jTabbedPane1.addTab("Chart", chartOptionsPanel);
    chartDomLimitsPanel.add(datasetLimitEnableCheckBox, null);
    chartDomLimitsPanel.add(useDataPointsRadioButton, null);
    chartDomLimitsPanel.add(useTimeRadioButton, null);
    chartDomLimitsPanel.add(domainDisplayLimitSlider, null);
    chartDomLimitsPanel.add(domainLimitLabel, null);
    chartOptionsPanel.add(scrollDomainCheckBox, null);
    chartOptionsPanel.add(showCommentsCheckBox, null);
    chartOptionsPanel.add(axis4LabelTextField, null);
    chartOptionsPanel.add(axis3LabelTextField, null);
    chartOptionsPanel.add(axis2LabelTextField, null);
    chartOptionsPanel.add(axis1LabelTextField, null);
    chartOptionsPanel.add(chartTitleTextField, null);
    chartOptionsPanel.add(jLabel6, null);
    chartOptionsPanel.add(jLabel4, null);
    chartOptionsPanel.add(jLabel3, null);
    chartOptionsPanel.add(jLabel2, null);
    chartOptionsPanel.add(jLabel1, null);
    chartOptionsPanel.add(chartDomLimitsPanel, null);

    tglbtnpauseplay = new JToggleButton("");
    tglbtnpauseplay.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            if (lpm == null)
                return;
            boolean doPause = false;
            if (e.getStateChange() == ItemEvent.SELECTED) {
                doPause = true;
            }
            lpm.setReaderPaused(doPause);
        }
    });
    //        tglbtnpauseplay.addChangeListener(new ChangeListener() {
    //           public void stateChanged(ChangeEvent e) {
    //              System.out.println(e.toString());
    //              //lpm.setReaderPaused(doPause)
    //           }
    //        });
    tglbtnpauseplay
            .setSelectedIcon(new ImageIcon(LogChartFrame.class.getResource("/lejos/pc/charting/play.png")));
    tglbtnpauseplay.setIcon(new ImageIcon(LogChartFrame.class.getResource("/lejos/pc/charting/pause.png")));
    tglbtnpauseplay.setBounds(571, 135, 30, 30);
    chartOptionsPanel.add(tglbtnpauseplay);

    jTabbedPane1.setToolTipTextAt(0, "The tab-delimited log of the data sent from the NXT");
    jTabbedPane1.setToolTipTextAt(1, "Status output");
    jTabbedPane1.setToolTipTextAt(2, "Chart options");
    jTabbedPane1.setMnemonicAt(0, KeyEvent.VK_D);
    jTabbedPane1.setMnemonicAt(1, KeyEvent.VK_S);
    jTabbedPane1.setMnemonicAt(2, KeyEvent.VK_T);
    this.getContentPane().add(customChartPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
            GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    this.getContentPane().add(UIPanel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
            GridBagConstraints.NONE, new Insets(0, 0, 0, 0), -107, 0));

    this.getContentPane().add(jTabbedPane1, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,
            GridBagConstraints.NORTHEAST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    UIPanel.add(connectionPanel, null);
    UIPanel.add(selectFolderButton, null);
    UIPanel.add(logFileTextField, null);
    UIPanel.add(jLabel1logfilename, null);
    UIPanel.add(FQPathTextArea, null);
    ActionListener taskPerformer = new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            String theData = null;
            for (;;) {
                theData = LogChartFrame.this.logDataQueue.poll();
                if (theData == null)
                    break;
                try {
                    dataLogTextArea.getDocument().insertString(dataLogTextArea.getDocument().getLength(),
                            theData, null);
                } catch (BadLocationException e) {
                    System.out.print(
                            "BadLocationException in datalog textarea updater thread:" + e.toString() + "\n");
                }
            }
        }
    };
    this.updateLogTextAreaTimer = new Timer(1000, taskPerformer);
    this.updateLogTextAreaTimer.start();
}

From source file:gdsc.smlm.ij.plugins.SpotAnalysis.java

private void createFrame() {
    Panel mainPanel = new Panel();
    add(mainPanel);//from   ww  w .j  av a 2  s . c o m

    inputChoice = new Choice();
    mainPanel.add(createChoicePanel(inputChoice, ""));

    widthTextField = new TextField();
    mainPanel.add(createTextPanel(widthTextField, "PSF width", "1.2"));

    blurTextField = new TextField();
    mainPanel.add(createTextPanel(blurTextField, "Blur (relative to width)", "1"));

    gainTextField = new TextField();
    mainPanel.add(createTextPanel(gainTextField, "Gain", "37.7"));

    exposureTextField = new TextField();
    mainPanel.add(createTextPanel(exposureTextField, "ms/Frame", "20"));

    smoothingTextField = new TextField();
    mainPanel.add(createTextPanel(smoothingTextField, "Smoothing", "0.25"));

    profileButton = new Button("Profile");
    profileButton.addActionListener(this);
    addButton = new Button("Add");
    addButton.addActionListener(this);
    deleteButton = new Button("Remove");
    deleteButton.addActionListener(this);
    saveButton = new Button("Save");
    saveButton.addActionListener(this);
    saveTracesButton = new Button("Save Traces");
    saveTracesButton.addActionListener(this);

    currentLabel = new Label();
    mainPanel.add(createLabelPanel(currentLabel, "", ""));

    rawFittedLabel = new Label();
    mainPanel.add(createLabelPanel(rawFittedLabel, "", ""));

    blurFittedLabel = new Label();
    mainPanel.add(createLabelPanel(blurFittedLabel, "", ""));

    JPanel buttonPanel = new JPanel();
    FlowLayout l = new FlowLayout();
    l.setVgap(0);
    buttonPanel.setLayout(l);
    buttonPanel.add(profileButton, BorderLayout.CENTER);
    buttonPanel.add(addButton, BorderLayout.CENTER);
    buttonPanel.add(deleteButton, BorderLayout.CENTER);
    buttonPanel.add(saveButton, BorderLayout.CENTER);
    buttonPanel.add(saveTracesButton, BorderLayout.CENTER);

    mainPanel.add(buttonPanel);

    listModel = new DefaultListModel<Spot>();
    onFramesList = new JList<Spot>(listModel);
    onFramesList.setVisibleRowCount(15);
    onFramesList.addListSelectionListener(this);
    //mainPanel.add(onFramesList);

    JScrollPane scrollPane = new JScrollPane(onFramesList);
    scrollPane.getVerticalScrollBarPolicy();
    mainPanel.add(scrollPane);

    GridBagLayout mainGrid = new GridBagLayout();
    int y = 0;
    GridBagConstraints c = new GridBagConstraints();
    c.gridx = 0;
    c.fill = GridBagConstraints.BOTH;
    c.anchor = GridBagConstraints.WEST;
    c.gridwidth = 1;
    c.insets = new Insets(2, 2, 2, 2);

    for (Component comp : mainPanel.getComponents()) {
        c.gridy = y++;
        mainGrid.setConstraints(comp, c);
    }

    mainPanel.setLayout(mainGrid);
}

From source file:com.marginallyclever.makelangelo.MainGUI.java

protected void AdjustSounds() {
    final JDialog driver = new JDialog(mainframe, translator.get("MenuSoundsTitle"), true);
    driver.setLayout(new GridBagLayout());

    final JTextField sound_connect = new JTextField(prefs.get("sound_connect", ""), 32);
    final JTextField sound_disconnect = new JTextField(prefs.get("sound_disconnect", ""), 32);
    final JTextField sound_conversion_finished = new JTextField(prefs.get("sound_conversion_finished", ""), 32);
    final JTextField sound_drawing_finished = new JTextField(prefs.get("sound_drawing_finished", ""), 32);

    final JButton change_sound_connect = new JButton(translator.get("MenuSoundsConnect"));
    final JButton change_sound_disconnect = new JButton(translator.get("MenuSoundsDisconnect"));
    final JButton change_sound_conversion_finished = new JButton(translator.get("MenuSoundsFinishConvert"));
    final JButton change_sound_drawing_finished = new JButton(translator.get("MenuSoundsFinishDraw"));

    //final JCheckBox allow_metrics = new JCheckBox(String.valueOf("I want to add the distance drawn to the // total"));
    //allow_metrics.setSelected(allowMetrics);

    final JButton cancel = new JButton(translator.get("Cancel"));
    final JButton save = new JButton(translator.get("Save"));

    GridBagConstraints c = new GridBagConstraints();
    //c.gridwidth=4;    c.gridx=0;  c.gridy=0;  driver.add(allow_metrics,c);

    c.anchor = GridBagConstraints.EAST;
    c.gridwidth = 1;//w w  w  .  j  a  va 2s. com
    c.gridx = 0;
    c.gridy = 3;
    driver.add(change_sound_connect, c);
    c.anchor = GridBagConstraints.WEST;
    c.gridwidth = 3;
    c.gridx = 1;
    c.gridy = 3;
    driver.add(sound_connect, c);
    c.anchor = GridBagConstraints.EAST;
    c.gridwidth = 1;
    c.gridx = 0;
    c.gridy = 4;
    driver.add(change_sound_disconnect, c);
    c.anchor = GridBagConstraints.WEST;
    c.gridwidth = 3;
    c.gridx = 1;
    c.gridy = 4;
    driver.add(sound_disconnect, c);
    c.anchor = GridBagConstraints.EAST;
    c.gridwidth = 1;
    c.gridx = 0;
    c.gridy = 5;
    driver.add(change_sound_conversion_finished, c);
    c.anchor = GridBagConstraints.WEST;
    c.gridwidth = 3;
    c.gridx = 1;
    c.gridy = 5;
    driver.add(sound_conversion_finished, c);
    c.anchor = GridBagConstraints.EAST;
    c.gridwidth = 1;
    c.gridx = 0;
    c.gridy = 6;
    driver.add(change_sound_drawing_finished, c);
    c.anchor = GridBagConstraints.WEST;
    c.gridwidth = 3;
    c.gridx = 1;
    c.gridy = 6;
    driver.add(sound_drawing_finished, c);

    c.anchor = GridBagConstraints.EAST;
    c.gridwidth = 1;
    c.gridx = 2;
    c.gridy = 12;
    driver.add(save, c);
    c.anchor = GridBagConstraints.WEST;
    c.gridwidth = 1;
    c.gridx = 3;
    c.gridy = 12;
    driver.add(cancel, c);

    ActionListener driveButtons = new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            Object subject = e.getSource();
            if (subject == change_sound_connect)
                sound_connect.setText(SelectFile());
            if (subject == change_sound_disconnect)
                sound_disconnect.setText(SelectFile());
            if (subject == change_sound_conversion_finished)
                sound_conversion_finished.setText(SelectFile());
            if (subject == change_sound_drawing_finished)
                sound_drawing_finished.setText(SelectFile());

            if (subject == save) {
                //allowMetrics = allow_metrics.isSelected();
                prefs.put("sound_connect", sound_connect.getText());
                prefs.put("sound_disconnect", sound_disconnect.getText());
                prefs.put("sound_conversion_finished", sound_conversion_finished.getText());
                prefs.put("sound_drawing_finished", sound_drawing_finished.getText());
                machineConfiguration.SaveConfig();
                driver.dispose();
            }
            if (subject == cancel) {
                driver.dispose();
            }
        }
    };

    change_sound_connect.addActionListener(driveButtons);
    change_sound_disconnect.addActionListener(driveButtons);
    change_sound_conversion_finished.addActionListener(driveButtons);
    change_sound_drawing_finished.addActionListener(driveButtons);

    save.addActionListener(driveButtons);
    cancel.addActionListener(driveButtons);
    driver.getRootPane().setDefaultButton(save);
    driver.pack();
    driver.setVisible(true);
}

From source file:edu.harvard.mcz.imagecapture.SpecimenDetailsViewPane.java

/**
 * This method initializes jPanel, laying out the UI components.
 *    /*from  w ww.  j ava 2s . com*/
 * @return javax.swing.JPanel   
 */
private JPanel getJPanel() {
    if (jPanel == null) {
        GridBagConstraints gridBagConstraintsImgCount = new GridBagConstraints();
        gridBagConstraintsImgCount.fill = GridBagConstraints.BOTH;
        gridBagConstraintsImgCount.gridy = 6;
        gridBagConstraintsImgCount.weightx = 1.0;
        gridBagConstraintsImgCount.anchor = GridBagConstraints.WEST;
        gridBagConstraintsImgCount.gridwidth = 4;
        gridBagConstraintsImgCount.insets = new Insets(0, 3, 5, 0);
        gridBagConstraintsImgCount.ipadx = 3;
        gridBagConstraintsImgCount.gridx = 4;
        GridBagConstraints gridBagConstraints124 = new GridBagConstraints();
        gridBagConstraints124.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints124.gridx = 0;
        gridBagConstraints124.anchor = GridBagConstraints.EAST;
        gridBagConstraints124.gridy = 20;
        GridBagConstraints gridBagConstraints38 = new GridBagConstraints();
        gridBagConstraints38.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints38.gridx = 0;
        gridBagConstraints38.anchor = GridBagConstraints.EAST;
        gridBagConstraints38.gridy = 27;
        GridBagConstraints gridBagConstraints215 = new GridBagConstraints();
        gridBagConstraints215.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints215.gridx = 0;
        gridBagConstraints215.anchor = GridBagConstraints.EAST;
        gridBagConstraints215.gridy = 26;
        GridBagConstraints gridBagConstraints120 = new GridBagConstraints();
        gridBagConstraints120.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints120.gridx = 3;
        gridBagConstraints120.weightx = 1.0;
        gridBagConstraints120.gridy = 25;
        jLabel44 = new JLabel();
        jLabel44.setText("yyyy/mm/dd");
        GridBagConstraints gridBagConstraints49 = new GridBagConstraints();
        gridBagConstraints49.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints49.fill = GridBagConstraints.BOTH;
        gridBagConstraints49.weighty = 1.0;
        gridBagConstraints49.weightx = 1.0;
        gridBagConstraints49.gridx = 1;
        gridBagConstraints49.gridwidth = 7;
        gridBagConstraints49.gridy = 35;
        GridBagConstraints gridBagConstraints214 = new GridBagConstraints();
        gridBagConstraints214.gridwidth = 3;
        gridBagConstraints214.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints214.anchor = GridBagConstraints.EAST;
        gridBagConstraints214.gridx = 4;
        gridBagConstraints214.gridy = 42;
        gridBagConstraints214.weightx = 0.0;
        gridBagConstraints214.weighty = 0.0;
        gridBagConstraints214.fill = GridBagConstraints.NONE;
        GridBagConstraints gridBagConstraints119 = new GridBagConstraints();
        gridBagConstraints119.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints119.anchor = GridBagConstraints.WEST;
        gridBagConstraints119.gridx = 7;
        gridBagConstraints119.gridy = 42;
        gridBagConstraints119.weightx = 0.0;
        gridBagConstraints119.weighty = 0.0;
        gridBagConstraints119.fill = GridBagConstraints.NONE;
        GridBagConstraints gridBagConstraints213 = new GridBagConstraints();
        gridBagConstraints213.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints213.fill = GridBagConstraints.BOTH;
        gridBagConstraints213.gridy = 31;
        gridBagConstraints213.weightx = 0.0;
        gridBagConstraints213.gridwidth = 7;
        gridBagConstraints213.anchor = GridBagConstraints.WEST;
        gridBagConstraints213.gridx = 1;
        GridBagConstraints gridBagConstraints118 = new GridBagConstraints();
        gridBagConstraints118.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints118.gridx = 0;
        gridBagConstraints118.anchor = GridBagConstraints.EAST;
        gridBagConstraints118.gridwidth = 1;
        gridBagConstraints118.gridy = 31;
        jLabel31 = new JLabel();
        jLabel31.setText("Publications");
        GridBagConstraints gridBagConstraints212 = new GridBagConstraints();
        gridBagConstraints212.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints212.gridx = 3;
        gridBagConstraints212.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints212.gridwidth = 4;
        gridBagConstraints212.gridy = 15;
        GridBagConstraints gridBagConstraints117 = new GridBagConstraints();
        gridBagConstraints117.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints117.fill = GridBagConstraints.BOTH;
        gridBagConstraints117.gridy = 25;
        gridBagConstraints117.weightx = 0.0;
        gridBagConstraints117.gridwidth = 4;
        gridBagConstraints117.anchor = GridBagConstraints.WEST;
        gridBagConstraints117.gridx = 4;
        GridBagConstraints gridBagConstraints211 = new GridBagConstraints();
        gridBagConstraints211.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints211.gridx = 3;
        gridBagConstraints211.gridwidth = 4;
        gridBagConstraints211.weighty = 1.0;
        gridBagConstraints211.gridy = 44;
        GridBagConstraints gridBagConstraintsMS = new GridBagConstraints();
        gridBagConstraintsMS.fill = GridBagConstraints.BOTH;
        gridBagConstraintsMS.gridx = 0;
        gridBagConstraintsMS.gridwidth = 8;
        gridBagConstraintsMS.weighty = 1.0;
        gridBagConstraintsMS.gridy = 45;
        gridBagConstraintsMS.gridx = 0;

        GridBagConstraints gridBagConstraints116 = new GridBagConstraints();
        gridBagConstraints116.gridwidth = 3;
        gridBagConstraints116.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints116.gridx = 4;
        gridBagConstraints116.anchor = GridBagConstraints.EAST;
        gridBagConstraints116.gridy = 41;
        GridBagConstraints gridBagConstraintsInfer = new GridBagConstraints();
        gridBagConstraintsInfer.insets = new Insets(0, 0, 0, 0);
        gridBagConstraintsInfer.fill = GridBagConstraints.BOTH;
        gridBagConstraintsInfer.gridy = 36;
        gridBagConstraintsInfer.weightx = 1.0;
        gridBagConstraintsInfer.anchor = GridBagConstraints.WEST;
        gridBagConstraintsInfer.gridwidth = 7;
        gridBagConstraintsInfer.gridx = 1;
        GridBagConstraints gridBagConstraints56 = new GridBagConstraints();
        gridBagConstraints56.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints56.gridx = 0;
        gridBagConstraints56.anchor = GridBagConstraints.EAST;
        gridBagConstraints56.gridy = 36;
        jLabel43 = new JLabel();
        jLabel43.setText("Inferences");
        GridBagConstraints gridBagConstraints48 = new GridBagConstraints();
        gridBagConstraints48.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints48.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints48.gridy = 0;
        gridBagConstraints48.weightx = 1.0;
        gridBagConstraints48.anchor = GridBagConstraints.WEST;
        gridBagConstraints48.gridwidth = 4;
        gridBagConstraints48.gridx = 4;
        GridBagConstraints gridBagConstraints37 = new GridBagConstraints();
        gridBagConstraints37.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints37.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints37.gridx = 3;
        gridBagConstraints37.anchor = GridBagConstraints.EAST;
        gridBagConstraints37.gridy = 0;
        jLabel42 = new JLabel();
        jLabel42.setText("Collection");
        GridBagConstraints gridBagConstraints29 = new GridBagConstraints();
        gridBagConstraints29.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints29.fill = GridBagConstraints.BOTH;
        gridBagConstraints29.gridy = 41;
        gridBagConstraints29.weightx = 1.0;
        gridBagConstraints29.anchor = GridBagConstraints.WEST;
        gridBagConstraints29.gridwidth = 3;
        gridBagConstraints29.gridx = 1;
        GridBagConstraints gridBagConstraints115 = new GridBagConstraints();
        gridBagConstraints115.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints115.gridx = 0;
        gridBagConstraints115.gridy = 41;
        jLabel41 = new JLabel();
        jLabel41.setText("Workflow Status");
        GridBagConstraints gridBagConstraints172 = new GridBagConstraints();
        gridBagConstraints172.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints172.fill = GridBagConstraints.BOTH;
        gridBagConstraints172.gridy = 33;
        gridBagConstraints172.weightx = 1.0;
        gridBagConstraints172.anchor = GridBagConstraints.WEST;
        gridBagConstraints172.gridwidth = 4;
        gridBagConstraints172.gridx = 4;
        GridBagConstraints gridBagConstraints162 = new GridBagConstraints();
        gridBagConstraints162.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints162.fill = GridBagConstraints.BOTH;
        gridBagConstraints162.gridy = 33;
        gridBagConstraints162.weightx = 1.0;
        gridBagConstraints162.anchor = GridBagConstraints.WEST;
        gridBagConstraints162.gridwidth = 2;
        gridBagConstraints162.gridx = 1;
        GridBagConstraints gridBagConstraints142 = new GridBagConstraints();
        gridBagConstraints142.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints142.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints142.gridy = 42;
        gridBagConstraints142.weightx = 1.0;
        gridBagConstraints142.anchor = GridBagConstraints.NORTHWEST;
        gridBagConstraints142.gridwidth = 3;
        gridBagConstraints142.ipady = 2;
        gridBagConstraints142.gridx = 1;
        GridBagConstraints gridBagConstraints133 = new GridBagConstraints();
        gridBagConstraints133.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints133.gridx = 0;
        gridBagConstraints133.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints133.gridy = 42;
        jLabel40 = new JLabel();
        jLabel40.setText("Questions");
        GridBagConstraints gridBagConstraints123 = new GridBagConstraints();
        gridBagConstraints123.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints123.gridx = 3;
        gridBagConstraints123.anchor = GridBagConstraints.EAST;
        gridBagConstraints123.gridy = 33;
        jLabel39 = new JLabel();
        jLabel39.setText("Habitat");
        GridBagConstraints gridBagConstraints114 = new GridBagConstraints();
        gridBagConstraints114.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints114.gridx = 0;
        gridBagConstraints114.anchor = GridBagConstraints.EAST;
        gridBagConstraints114.gridy = 33;
        jLabel38 = new JLabel();
        jLabel38.setText("Associated Taxon");
        GridBagConstraints gridBagConstraints94 = new GridBagConstraints();
        gridBagConstraints94.gridwidth = 3;
        gridBagConstraints94.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints94.gridx = 4;
        gridBagConstraints94.anchor = GridBagConstraints.WEST;
        gridBagConstraints94.gridy = 18;
        jLabel36 = new JLabel();
        jLabel36.setText("Valid Dist.");
        GridBagConstraints gridBagConstraints83 = new GridBagConstraints();
        gridBagConstraints83.gridx = 3;
        gridBagConstraints83.anchor = GridBagConstraints.EAST;
        gridBagConstraints83.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints83.weightx = 1.0;
        gridBagConstraints83.gridy = 18;
        GridBagConstraints gridBagConstraints65 = new GridBagConstraints();
        gridBagConstraints65.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints65.gridx = 0;
        gridBagConstraints65.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints65.gridy = 35;
        jLabel35 = new JLabel();
        jLabel35.setText("Specimen Notes");
        GridBagConstraints gridBagConstraints47 = new GridBagConstraints();
        gridBagConstraints47.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints47.gridx = 0;
        gridBagConstraints47.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints47.ipady = 12;
        gridBagConstraints47.gridy = 5;
        jLabel34 = new JLabel();
        jLabel34.setText("     ");
        GridBagConstraints gridBagConstraints19 = new GridBagConstraints();
        gridBagConstraints19.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints19.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints19.gridy = 23;
        gridBagConstraints19.weightx = 1.0;
        gridBagConstraints19.anchor = GridBagConstraints.NORTH;
        gridBagConstraints19.gridwidth = 5;
        gridBagConstraints19.gridx = 3;

        GridBagConstraints gridBagConstraints18 = new GridBagConstraints();
        gridBagConstraints18.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints18.fill = GridBagConstraints.BOTH;
        gridBagConstraints18.gridy = 19;
        gridBagConstraints18.weightx = 1.0;
        gridBagConstraints18.anchor = GridBagConstraints.WEST;
        gridBagConstraints18.gridx = 4;
        GridBagConstraints gbc_jLabelElevation = new GridBagConstraints();
        gbc_jLabelElevation.insets = new Insets(0, 0, 0, 5);
        gbc_jLabelElevation.gridx = 3;
        gbc_jLabelElevation.anchor = GridBagConstraints.EAST;
        gbc_jLabelElevation.gridy = 19;
        jLabelElevation = new JLabel();
        jLabelElevation.setText("Elevation");
        jLabel25 = new JLabel();
        jLabel25.setText("Text");
        jLabel26 = new JLabel();
        jLabel26.setText("Text");
        jLabel28 = new JLabel();
        jLabel28.setText("Rank");
        GridBagConstraints gridBagConstraints161 = new GridBagConstraints();
        gridBagConstraints161.gridx = 0;
        GridBagConstraints gridBagConstraints151 = new GridBagConstraints();
        gridBagConstraints151.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints151.fill = GridBagConstraints.BOTH;
        gridBagConstraints151.gridy = 27;
        gridBagConstraints151.weightx = 1.0;
        gridBagConstraints151.gridx = 1;
        GridBagConstraints gridBagConstraints141 = new GridBagConstraints();
        gridBagConstraints141.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints141.fill = GridBagConstraints.BOTH;
        gridBagConstraints141.gridy = 26;
        gridBagConstraints141.weightx = 1.0;
        gridBagConstraints141.gridx = 1;
        GridBagConstraints gridBagConstraints132 = new GridBagConstraints();
        gridBagConstraints132.gridwidth = 3;
        gridBagConstraints132.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints132.fill = GridBagConstraints.BOTH;
        gridBagConstraints132.gridy = 27;
        gridBagConstraints132.weightx = 1.0;
        gridBagConstraints132.gridx = 4;
        GridBagConstraints gridBagConstraints122 = new GridBagConstraints();
        gridBagConstraints122.gridwidth = 3;
        gridBagConstraints122.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints122.fill = GridBagConstraints.BOTH;
        gridBagConstraints122.gridy = 26;
        gridBagConstraints122.weightx = 1.0;
        gridBagConstraints122.gridx = 4;
        GridBagConstraints gridBagConstraints113 = new GridBagConstraints();
        gridBagConstraints113.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints113.gridx = 3;
        gridBagConstraints113.anchor = GridBagConstraints.EAST;
        gridBagConstraints113.gridy = 27;
        GridBagConstraints gridBagConstraints103 = new GridBagConstraints();
        gridBagConstraints103.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints103.gridx = 3;
        gridBagConstraints103.anchor = GridBagConstraints.EAST;
        gridBagConstraints103.gridy = 26;
        GridBagConstraints gridBagConstraints93 = new GridBagConstraints();
        gridBagConstraints93.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints93.fill = GridBagConstraints.BOTH;
        gridBagConstraints93.gridy = 12;
        gridBagConstraints93.weightx = 1.0;
        gridBagConstraints93.gridx = 1;
        GridBagConstraints gridBagConstraints84 = new GridBagConstraints();
        gridBagConstraints84.gridwidth = 3;
        gridBagConstraints84.fill = GridBagConstraints.BOTH;
        gridBagConstraints84.gridy = 12;
        gridBagConstraints84.weightx = 1.0;
        gridBagConstraints84.anchor = GridBagConstraints.WEST;
        gridBagConstraints84.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints84.gridx = 4;
        GridBagConstraints gridBagConstraints74 = new GridBagConstraints();
        gridBagConstraints74.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints74.gridx = 3;
        gridBagConstraints74.anchor = GridBagConstraints.EAST;
        gridBagConstraints74.weightx = 0.0;
        gridBagConstraints74.gridy = 12;
        //         GridBagConstraints gridBagConstraints64 = new GridBagConstraints();
        //         gridBagConstraints64.fill = GridBagConstraints.BOTH;
        //         gridBagConstraints64.gridy = 14;
        //         gridBagConstraints64.weightx = 1.0;
        //         gridBagConstraints64.gridx = 3;
        GridBagConstraints gridBagConstraints55 = new GridBagConstraints();
        gridBagConstraints55.gridx = 2;
        gridBagConstraints55.gridy = 14;
        //jLabel31 = new JLabel();
        //jLabel31.setText("Qual.");
        GridBagConstraints gridBagConstraints46 = new GridBagConstraints();
        gridBagConstraints46.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints46.fill = GridBagConstraints.BOTH;
        gridBagConstraints46.gridy = 14;
        gridBagConstraints46.weightx = 1.0;
        gridBagConstraints46.anchor = GridBagConstraints.WEST;
        gridBagConstraints46.gridx = 1;
        gridBagConstraints46.gridwidth = 2;
        GridBagConstraints gridBagConstraints36 = new GridBagConstraints();
        gridBagConstraints36.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints36.gridx = 0;
        gridBagConstraints36.anchor = GridBagConstraints.EAST;
        gridBagConstraints36.gridy = 14;
        jLabel30 = new JLabel();
        jLabel30.setText("Unnamed Form");
        GridBagConstraints gridBagConstraints210 = new GridBagConstraints();
        gridBagConstraints210.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints210.fill = GridBagConstraints.BOTH;
        gridBagConstraints210.gridy = 13;
        gridBagConstraints210.weightx = 1.0;
        gridBagConstraints210.anchor = GridBagConstraints.WEST;
        gridBagConstraints210.gridwidth = 2;
        gridBagConstraints210.gridx = 1;
        GridBagConstraints gridBagConstraints112 = new GridBagConstraints();
        gridBagConstraints112.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints112.gridx = 0;
        gridBagConstraints112.anchor = GridBagConstraints.EAST;
        gridBagConstraints112.gridy = 13;
        jLabel29 = new JLabel();
        jLabel29.setText("Author");
        GridBagConstraints gridBagConstraints110 = new GridBagConstraints();
        gridBagConstraints110.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints110.gridx = 0;
        gridBagConstraints110.gridy = 12;
        jLabel27 = new JLabel();
        jLabel27.setText("Infrasubspecifc Name");
        GridBagConstraints gridBagConstraints63 = new GridBagConstraints();
        gridBagConstraints63.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints63.fill = GridBagConstraints.BOTH;
        gridBagConstraints63.gridy = 25;
        gridBagConstraints63.weightx = 1.0;
        gridBagConstraints63.anchor = GridBagConstraints.WEST;
        gridBagConstraints63.gridx = 1;
        GridBagConstraints gridBagConstraints35 = new GridBagConstraints();
        gridBagConstraints35.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints35.gridx = 0;
        gridBagConstraints35.anchor = GridBagConstraints.EAST;
        gridBagConstraints35.gridy = 25;
        jLabel22 = new JLabel();
        jLabel22.setText("Verbatim Date");
        GridBagConstraints gridBagConstraints27 = new GridBagConstraints();
        gridBagConstraints27.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints27.fill = GridBagConstraints.BOTH;
        gridBagConstraints27.gridy = 30;
        gridBagConstraints27.weightx = 1.0;
        gridBagConstraints27.anchor = GridBagConstraints.WEST;
        gridBagConstraints27.gridx = 1;
        GridBagConstraints gridBagConstraints102 = new GridBagConstraints();
        gridBagConstraints102.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints102.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints102.gridy = 30;
        gridBagConstraints102.weightx = 1.0;
        gridBagConstraints102.anchor = GridBagConstraints.WEST;
        gridBagConstraints102.gridwidth = 4;
        gridBagConstraints102.gridx = 4;
        GridBagConstraints gridBagConstraints92 = new GridBagConstraints();
        gridBagConstraints92.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints92.gridx = 3;
        gridBagConstraints92.anchor = GridBagConstraints.EAST;
        gridBagConstraints92.gridy = 30;
        jLabel21 = new JLabel();
        jLabel21.setText("Sex");
        GridBagConstraints gridBagConstraints82 = new GridBagConstraints();
        gridBagConstraints82.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints82.gridx = 0;
        gridBagConstraints82.anchor = GridBagConstraints.EAST;
        gridBagConstraints82.gridy = 30;
        jLabel20 = new JLabel();
        jLabel20.setText("LifeStage");
        GridBagConstraints gridBagConstraints62 = new GridBagConstraints();
        gridBagConstraints62.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints62.fill = GridBagConstraints.BOTH;
        gridBagConstraints62.gridy = 7;
        gridBagConstraints62.weightx = 1.0;
        gridBagConstraints62.anchor = GridBagConstraints.WEST;
        gridBagConstraints62.gridwidth = 4;
        gridBagConstraints62.gridx = 4;
        GridBagConstraints gridBagConstraints53 = new GridBagConstraints();
        gridBagConstraints53.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints53.fill = GridBagConstraints.BOTH;
        gridBagConstraints53.gridy = 7;
        gridBagConstraints53.weightx = 1.0;
        gridBagConstraints53.anchor = GridBagConstraints.WEST;
        gridBagConstraints53.gridwidth = 1;
        gridBagConstraints53.gridx = 1;
        GridBagConstraints gridBagConstraints44 = new GridBagConstraints();
        gridBagConstraints44.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints44.fill = GridBagConstraints.BOTH;
        gridBagConstraints44.gridy = 6;
        gridBagConstraints44.weightx = 1.0;
        gridBagConstraints44.anchor = GridBagConstraints.WEST;
        gridBagConstraints44.gridwidth = 3;
        gridBagConstraints44.gridx = 1;
        GridBagConstraints gbc_jLabelTribe = new GridBagConstraints();
        gbc_jLabelTribe.insets = new Insets(0, 0, 0, 5);
        gbc_jLabelTribe.gridx = 3;
        gbc_jLabelTribe.anchor = GridBagConstraints.EAST;
        gbc_jLabelTribe.gridy = 7;
        jLabelTribe = new JLabel();
        jLabelTribe.setText("Tribe");
        GridBagConstraints gridBagConstraints26 = new GridBagConstraints();
        gridBagConstraints26.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints26.gridx = 0;
        gridBagConstraints26.anchor = GridBagConstraints.EAST;
        gridBagConstraints26.gridy = 7;
        jLabel17 = new JLabel();
        jLabel17.setText("Subfamily");
        GridBagConstraints gridBagConstraints16 = new GridBagConstraints();
        gridBagConstraints16.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints16.gridx = 0;
        gridBagConstraints16.anchor = GridBagConstraints.EAST;
        gridBagConstraints16.gridy = 6;
        jLabel16 = new JLabel();
        jLabel16.setText("Family");
        GridBagConstraints gridBagConstraints131 = new GridBagConstraints();
        gridBagConstraints131.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints131.fill = GridBagConstraints.BOTH;
        gridBagConstraints131.gridy = 19;
        gridBagConstraints131.weightx = 1.0;
        gridBagConstraints131.anchor = GridBagConstraints.WEST;
        gridBagConstraints131.gridwidth = 2;
        gridBagConstraints131.gridx = 1;
        GridBagConstraints gridBagConstraints121 = new GridBagConstraints();
        gridBagConstraints121.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints121.fill = GridBagConstraints.BOTH;
        gridBagConstraints121.gridy = 18;
        gridBagConstraints121.weightx = 1.0;
        gridBagConstraints121.anchor = GridBagConstraints.WEST;
        gridBagConstraints121.gridwidth = 1;
        gridBagConstraints121.gridx = 1;
        GridBagConstraints gridBagConstraints111 = new GridBagConstraints();
        gridBagConstraints111.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints111.fill = GridBagConstraints.BOTH;
        gridBagConstraints111.gridy = 16;
        gridBagConstraints111.weightx = 1.0;
        gridBagConstraints111.anchor = GridBagConstraints.WEST;
        gridBagConstraints111.gridwidth = 7;
        gridBagConstraints111.gridx = 1;
        GridBagConstraints gridBagConstraints101 = new GridBagConstraints();
        gridBagConstraints101.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints101.gridx = 0;
        gridBagConstraints101.anchor = GridBagConstraints.EAST;
        gridBagConstraints101.gridy = 19;
        jLabel15 = new JLabel();
        jLabel15.setText("State/Province");
        GridBagConstraints gridBagConstraints91 = new GridBagConstraints();
        gridBagConstraints91.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints91.gridx = 0;
        gridBagConstraints91.anchor = GridBagConstraints.EAST;
        gridBagConstraints91.gridy = 18;
        jLabel14 = new JLabel();
        jLabel14.setText("Country");
        GridBagConstraints gridBagConstraints81 = new GridBagConstraints();
        gridBagConstraints81.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints81.gridx = 0;
        gridBagConstraints81.anchor = GridBagConstraints.EAST;
        gridBagConstraints81.gridy = 16;
        jLabel13 = new JLabel();
        jLabel13.setText("Verbatim Locality");
        GridBagConstraints gridBagConstraints71 = new GridBagConstraints();
        gridBagConstraints71.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints71.fill = GridBagConstraints.BOTH;
        gridBagConstraints71.gridy = 15;
        gridBagConstraints71.weightx = 1.0;
        gridBagConstraints71.anchor = GridBagConstraints.WEST;
        gridBagConstraints71.gridx = 1;
        GridBagConstraints gridBagConstraints61 = new GridBagConstraints();
        gridBagConstraints61.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints61.gridx = 0;
        gridBagConstraints61.anchor = GridBagConstraints.EAST;
        gridBagConstraints61.gridy = 15;
        jLabel12 = new JLabel();
        jLabel12.setText("DrawerNumber");
        GridBagConstraints gridBagConstraints52 = new GridBagConstraints();
        gridBagConstraints52.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints52.fill = GridBagConstraints.BOTH;
        gridBagConstraints52.gridy = 43;
        gridBagConstraints52.weightx = 1.0;
        gridBagConstraints52.weighty = 1.0;
        gridBagConstraints52.gridwidth = 8;
        gridBagConstraints52.gridx = 0;
        GridBagConstraints gridBagConstraints43 = new GridBagConstraints();
        gridBagConstraints43.gridheight = 2;
        gridBagConstraints43.gridx = 0;
        gridBagConstraints43.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints43.ipady = 0;
        gridBagConstraints43.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints43.gridy = 23;
        GridBagConstraints gridBagConstraints33 = new GridBagConstraints();
        gridBagConstraints33.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints33.gridx = 0;
        gridBagConstraints33.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints33.gridy = 4;
        GridBagConstraints gridBagConstraints25 = new GridBagConstraints();
        gridBagConstraints25.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints25.fill = GridBagConstraints.BOTH;
        gridBagConstraints25.gridy = 3;
        gridBagConstraints25.weightx = 1.0;
        gridBagConstraints25.weighty = 0.0;
        gridBagConstraints25.gridheight = 3;
        gridBagConstraints25.gridwidth = 6;
        gridBagConstraints25.gridx = 1;
        GridBagConstraints gridBagConstraints15 = new GridBagConstraints();
        gridBagConstraints15.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints15.gridx = 0;
        gridBagConstraints15.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints15.gridy = 3;
        jLabel11 = new JLabel();
        jLabel11.setText("Numbers");
        GridBagConstraints gridBagConstraints42 = new GridBagConstraints();
        gridBagConstraints42.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints42.gridx = 3;
        gridBagConstraints42.anchor = GridBagConstraints.EAST;
        gridBagConstraints42.gridy = 37;
        jLabel10 = new JLabel();
        jLabel10.setText("Date Created");
        GridBagConstraints gridBagConstraints32 = new GridBagConstraints();
        gridBagConstraints32.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints32.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints32.gridy = 37;
        gridBagConstraints32.weightx = 1.0;
        gridBagConstraints32.anchor = GridBagConstraints.WEST;
        gridBagConstraints32.gridwidth = 4;
        gridBagConstraints32.gridx = 4;
        GridBagConstraints gridBagConstraints24 = new GridBagConstraints();
        gridBagConstraints24.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints24.gridx = 0;
        gridBagConstraints24.anchor = GridBagConstraints.EAST;
        gridBagConstraints24.gridy = 37;
        jLabel9 = new JLabel();
        jLabel9.setText("CreatedBy");
        GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
        gridBagConstraints14.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints14.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints14.gridy = 37;
        gridBagConstraints14.weightx = 1.0;
        gridBagConstraints14.anchor = GridBagConstraints.WEST;
        gridBagConstraints14.gridx = 1;
        GridBagConstraints gridBagConstraints23 = new GridBagConstraints();
        gridBagConstraints23.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints23.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints23.gridy = 39;
        gridBagConstraints23.weightx = 1.0;
        gridBagConstraints23.anchor = GridBagConstraints.WEST;
        gridBagConstraints23.gridwidth = 4;
        gridBagConstraints23.gridx = 4;
        GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
        gridBagConstraints13.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints13.gridx = 3;
        gridBagConstraints13.anchor = GridBagConstraints.EAST;
        gridBagConstraints13.gridy = 39;
        jLabel8 = new JLabel();
        jLabel8.setText("Last Updated");
        GridBagConstraints gridBagConstraints22 = new GridBagConstraints();
        gridBagConstraints22.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints22.gridx = 0;
        gridBagConstraints22.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints22.gridy = 22;
        jLabel7 = new JLabel();
        jLabel7.setText("Collectors");
        GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
        gridBagConstraints12.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints12.gridy = 39;
        gridBagConstraints12.weightx = 1.0;
        gridBagConstraints12.anchor = GridBagConstraints.NORTHWEST;
        gridBagConstraints12.gridx = 1;
        GridBagConstraints gridBagConstraints51 = new GridBagConstraints();
        gridBagConstraints51.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints51.fill = GridBagConstraints.BOTH;
        gridBagConstraints51.gridy = 22;
        gridBagConstraints51.weightx = 1.0;
        gridBagConstraints51.anchor = GridBagConstraints.WEST;
        gridBagConstraints51.gridheight = 3;
        gridBagConstraints51.gridwidth = 2;
        gridBagConstraints51.gridx = 1;
        GridBagConstraints gridBagConstraints41 = new GridBagConstraints();
        gridBagConstraints41.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints41.gridx = 0;
        gridBagConstraints41.fill = GridBagConstraints.NONE;
        gridBagConstraints41.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints41.gridy = 39;
        jLabel6 = new JLabel();
        jLabel6.setText("LastUpdatedBy");
        GridBagConstraints gridBagConstraints31 = new GridBagConstraints();
        gridBagConstraints31.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints31.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints31.gridy = 21;
        gridBagConstraints31.weightx = 1.0;
        gridBagConstraints31.anchor = GridBagConstraints.WEST;
        gridBagConstraints31.gridwidth = 6;
        gridBagConstraints31.gridx = 1;
        GridBagConstraints gridBagConstraints21 = new GridBagConstraints();
        gridBagConstraints21.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints21.gridx = 0;
        gridBagConstraints21.anchor = GridBagConstraints.SOUTHEAST;
        gridBagConstraints21.gridy = 21;
        jLabel5 = new JLabel();
        jLabel5.setText("Collection");
        GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
        gridBagConstraints10.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints10.gridx = 7;
        gridBagConstraints10.anchor = GridBagConstraints.NORTHWEST;
        gridBagConstraints10.gridy = 41;
        gridBagConstraints10.weighty = 0.0;
        GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
        gridBagConstraints9.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints9.gridx = 0;
        gridBagConstraints9.anchor = GridBagConstraints.EAST;
        gridBagConstraints9.gridy = 11;
        jLabel4 = new JLabel();
        jLabel4.setText("Subspecies");
        GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
        gridBagConstraints8.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints8.gridx = 0;
        gridBagConstraints8.anchor = GridBagConstraints.EAST;
        gridBagConstraints8.gridy = 10;
        jLabel3 = new JLabel();
        jLabel3.setText("Species");
        GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
        gridBagConstraints7.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints7.fill = GridBagConstraints.BOTH;
        gridBagConstraints7.gridy = 20;
        gridBagConstraints7.weightx = 1.0;
        gridBagConstraints7.anchor = GridBagConstraints.WEST;
        gridBagConstraints7.gridwidth = 7;
        gridBagConstraints7.gridx = 1;
        GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
        gridBagConstraints5.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints5.fill = GridBagConstraints.BOTH;
        gridBagConstraints5.gridy = 11;
        gridBagConstraints5.weightx = 1.0;
        gridBagConstraints5.anchor = GridBagConstraints.WEST;
        gridBagConstraints5.gridwidth = 2;
        gridBagConstraints5.gridx = 1;
        GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
        gridBagConstraints4.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints4.fill = GridBagConstraints.BOTH;
        gridBagConstraints4.gridy = 10;
        gridBagConstraints4.weightx = 1.0;
        gridBagConstraints4.anchor = GridBagConstraints.WEST;
        gridBagConstraints4.gridwidth = 2;
        gridBagConstraints4.gridx = 1;
        GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
        gridBagConstraints3.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints3.fill = GridBagConstraints.BOTH;
        gridBagConstraints3.gridy = 9;
        gridBagConstraints3.weightx = 1.0;
        gridBagConstraints3.anchor = GridBagConstraints.WEST;
        gridBagConstraints3.gridwidth = 2;
        gridBagConstraints3.gridx = 1;
        GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
        gridBagConstraints2.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints2.gridx = 0;
        gridBagConstraints2.anchor = GridBagConstraints.EAST;
        gridBagConstraints2.gridy = 9;
        jLabel2 = new JLabel();
        jLabel2.setText("Genus");
        GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
        gridBagConstraints11.gridx = 0;
        gridBagConstraints11.gridy = 1;
        GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
        gridBagConstraints1.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints1.fill = GridBagConstraints.BOTH;
        gridBagConstraints1.gridy = 0;
        gridBagConstraints1.weightx = 1.0;
        gridBagConstraints1.anchor = GridBagConstraints.WEST;
        gridBagConstraints1.gridx = 1;
        GridBagConstraints gridBagConstraints = new GridBagConstraints();
        gridBagConstraints.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints.gridx = 0;
        gridBagConstraints.anchor = GridBagConstraints.EAST;
        gridBagConstraints.gridy = 0;
        jLabel = new JLabel();
        jLabel.setText("Barcode");
        jPanel = new JPanel();
        GridBagLayout gbl_jPanel = new GridBagLayout();
        gbl_jPanel.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
        gbl_jPanel.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
        gbl_jPanel.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
        gbl_jPanel.columnWeights = new double[] { 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0 };
        jPanel.setLayout(gbl_jPanel);
        jPanel.add(jLabel, gridBagConstraints);
        jPanel.add(getJTextFieldBarcode(), gridBagConstraints1);
        jPanel.add(jLabel2, gridBagConstraints2);
        jPanel.add(getJTextField1(), gridBagConstraints3);
        GridBagConstraints gbc_lblNatureofid = new GridBagConstraints();
        gbc_lblNatureofid.anchor = GridBagConstraints.EAST;
        gbc_lblNatureofid.insets = new Insets(0, 0, 0, 5);
        gbc_lblNatureofid.gridx = 3;
        gbc_lblNatureofid.gridy = 9;
        jPanel.add(getLblNatureofid(), gbc_lblNatureofid);

        jComboBoxNatureOfId = getJComboBoxNatureOfId();
        GridBagConstraints gbc_jTextFieldNatureOfID = new GridBagConstraints();
        gbc_jTextFieldNatureOfID.gridwidth = 4;
        gbc_jTextFieldNatureOfID.insets = new Insets(0, 0, 0, 0);
        gbc_jTextFieldNatureOfID.fill = GridBagConstraints.HORIZONTAL;
        gbc_jTextFieldNatureOfID.gridx = 4;
        gbc_jTextFieldNatureOfID.gridy = 9;
        jPanel.add(jComboBoxNatureOfId, gbc_jTextFieldNatureOfID);
        jPanel.add(getJTextField12(), gridBagConstraints4);
        GridBagConstraints gbc_lblIdDate = new GridBagConstraints();
        gbc_lblIdDate.anchor = GridBagConstraints.EAST;
        gbc_lblIdDate.insets = new Insets(0, 0, 0, 5);
        gbc_lblIdDate.gridx = 3;
        gbc_lblIdDate.gridy = 10;
        jPanel.add(getLblIdDate(), gbc_lblIdDate);

        jTextFieldDateDetermined = getJTextFieldDateDetermined();
        GridBagConstraints gbc_jTextFieldDateDetermined = new GridBagConstraints();
        gbc_jTextFieldDateDetermined.gridwidth = 4;
        gbc_jTextFieldDateDetermined.insets = new Insets(0, 0, 0, 0);
        gbc_jTextFieldDateDetermined.fill = GridBagConstraints.HORIZONTAL;
        gbc_jTextFieldDateDetermined.gridx = 4;
        gbc_jTextFieldDateDetermined.gridy = 10;
        jPanel.add(jTextFieldDateDetermined, gbc_jTextFieldDateDetermined);
        jTextFieldDateDetermined.setColumns(10);
        jPanel.add(getJTextField2(), gridBagConstraints5);

        JLabel lblIdBy = new JLabel("Id By");
        GridBagConstraints gbc_lblIdBy = new GridBagConstraints();
        gbc_lblIdBy.anchor = GridBagConstraints.EAST;
        gbc_lblIdBy.insets = new Insets(0, 0, 0, 5);
        gbc_lblIdBy.gridx = 3;
        gbc_lblIdBy.gridy = 11;
        jPanel.add(lblIdBy, gbc_lblIdBy);

        jCBDeterminer = getJCBDeterminer();
        GridBagConstraints gbc_jTextFieldDeterminer = new GridBagConstraints();
        gbc_jTextFieldDeterminer.gridwidth = 4;
        gbc_jTextFieldDeterminer.insets = new Insets(0, 0, 0, 0);
        gbc_jTextFieldDeterminer.fill = GridBagConstraints.HORIZONTAL;
        gbc_jTextFieldDeterminer.gridx = 4;
        gbc_jTextFieldDeterminer.gridy = 11;
        jPanel.add(jCBDeterminer, gbc_jTextFieldDeterminer);

        GridBagConstraints gbc_lblIdRemarks = new GridBagConstraints();
        gbc_lblIdRemarks.anchor = GridBagConstraints.EAST;
        gbc_lblIdRemarks.insets = new Insets(0, 0, 0, 5);
        gbc_lblIdRemarks.gridx = 3;
        gbc_lblIdRemarks.gridy = 13;
        jPanel.add(getLblIdRemarks(), gbc_lblIdRemarks);

        jTextFieldIdRemarks = getJTextFieldIdRemarks();
        GridBagConstraints gbc_jTextFieldIdRemarks = new GridBagConstraints();
        gbc_jTextFieldIdRemarks.insets = new Insets(0, 0, 0, 0);
        gbc_jTextFieldIdRemarks.fill = GridBagConstraints.HORIZONTAL;
        gbc_jTextFieldIdRemarks.gridx = 4;
        gbc_jTextFieldIdRemarks.gridy = 13;
        gbc_jTextFieldIdRemarks.gridwidth = 4;
        jPanel.add(jTextFieldIdRemarks, gbc_jTextFieldIdRemarks);
        jTextFieldIdRemarks.setColumns(10);
        GridBagConstraints gbc_lblTypestatus = new GridBagConstraints();
        gbc_lblTypestatus.anchor = GridBagConstraints.EAST;
        gbc_lblTypestatus.insets = new Insets(0, 0, 0, 5);
        gbc_lblTypestatus.gridx = 3;
        gbc_lblTypestatus.gridy = 14;
        jPanel.add(getLblTypestatus(), gbc_lblTypestatus);
        cbTypeStatus = getCbTypeStatus();
        GridBagConstraints gbc_cbTypeStatus = new GridBagConstraints();
        gbc_cbTypeStatus.gridwidth = 4;
        gbc_cbTypeStatus.insets = new Insets(0, 0, 0, 5);
        gbc_cbTypeStatus.fill = GridBagConstraints.HORIZONTAL;
        gbc_cbTypeStatus.gridx = 4;
        gbc_cbTypeStatus.gridy = 14;
        jPanel.add(cbTypeStatus, gbc_cbTypeStatus);
        GridBagConstraints gbc_lblHigherGeography = new GridBagConstraints();
        gbc_lblHigherGeography.anchor = GridBagConstraints.EAST;
        gbc_lblHigherGeography.insets = new Insets(0, 0, 0, 5);
        gbc_lblHigherGeography.gridx = 0;
        gbc_lblHigherGeography.gridy = 17;
        jPanel.add(getLblHigherGeography(), gbc_lblHigherGeography);
        GridBagConstraints gbc_comboBoxElevUnits = new GridBagConstraints();
        gbc_comboBoxElevUnits.insets = new Insets(0, 0, 0, 0);
        gbc_comboBoxElevUnits.gridwidth = 7;
        gbc_comboBoxElevUnits.fill = GridBagConstraints.HORIZONTAL;
        gbc_comboBoxElevUnits.gridx = 1;
        gbc_comboBoxElevUnits.gridy = 17;
        jPanel.add(getComboBoxHighGeog(), gbc_comboBoxElevUnits);
        GridBagConstraints gbc_lblTo = new GridBagConstraints();
        gbc_lblTo.insets = new Insets(0, 0, 0, 5);
        gbc_lblTo.anchor = GridBagConstraints.EAST;
        gbc_lblTo.gridx = 5;
        gbc_lblTo.gridy = 19;
        jPanel.add(getLblTo(), gbc_lblTo);
        GridBagConstraints gbc_textFieldMaxElev = new GridBagConstraints();
        gbc_textFieldMaxElev.insets = new Insets(0, 0, 0, 5);
        gbc_textFieldMaxElev.fill = GridBagConstraints.BOTH;
        gbc_textFieldMaxElev.gridx = 6;
        gbc_textFieldMaxElev.gridy = 19;
        jPanel.add(getTextFieldMaxElev(), gbc_textFieldMaxElev);
        GridBagConstraints gbc_comboBoxMaxElev = new GridBagConstraints();
        gbc_comboBoxMaxElev.insets = new Insets(0, 0, 0, 0);
        gbc_comboBoxMaxElev.fill = GridBagConstraints.HORIZONTAL;
        gbc_comboBoxMaxElev.gridx = 7;
        gbc_comboBoxMaxElev.gridy = 19;
        jPanel.add(getComboBoxElevUnits(), gbc_comboBoxMaxElev);
        jPanel.add(getJTextField3(), gridBagConstraints7);
        jPanel.add(jLabel3, gridBagConstraints8);
        jPanel.add(jLabel4, gridBagConstraints9);
        GridBagConstraints gridBagConstraints28 = new GridBagConstraints();
        gridBagConstraints28.gridwidth = 4;
        gridBagConstraints28.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints28.gridx = 3;
        gridBagConstraints28.anchor = GridBagConstraints.WEST;
        gridBagConstraints28.fill = GridBagConstraints.NONE;
        gridBagConstraints28.gridy = 22;
        jLabel33 = new JLabel();
        jLabel33.setText("Collecting Method");
        jPanel.add(jLabel33, gridBagConstraints28);
        GridBagConstraints gbc_georef = new GridBagConstraints();
        gbc_georef.insets = new Insets(0, 0, 0, 0);
        gbc_georef.gridwidth = 5;
        gbc_georef.fill = GridBagConstraints.HORIZONTAL;
        gbc_georef.gridx = 3;
        gbc_georef.gridy = 24;
        GridBagConstraints gridBagConstraints72 = new GridBagConstraints();
        gridBagConstraints72.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints72.gridx = 0;
        gridBagConstraints72.anchor = GridBagConstraints.EAST;
        gridBagConstraints72.gridy = 28;
        jLabel19 = new JLabel();
        jLabel19.setText("Features");
        jPanel.add(jLabel19, gridBagConstraints72);
        GridBagConstraints gridBagConstraints17 = new GridBagConstraints();
        gridBagConstraints17.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints17.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints17.gridy = 28;
        gridBagConstraints17.weightx = 1.0;
        gridBagConstraints17.anchor = GridBagConstraints.WEST;
        gridBagConstraints17.gridx = 1;
        jPanel.add(getJComboBoxFeatures(), gridBagConstraints17);
        GridBagConstraints gridBagConstraints104 = new GridBagConstraints();
        gridBagConstraints104.insets = new Insets(0, 0, 0, 5);
        gridBagConstraints104.gridx = 3;
        gridBagConstraints104.anchor = GridBagConstraints.EAST;
        gridBagConstraints104.gridy = 28;
        jLabel37 = new JLabel();
        jLabel37.setText("Prep Type");
        jPanel.add(jLabel37, gridBagConstraints104);
        GridBagConstraints gridBagConstraints152 = new GridBagConstraints();
        gridBagConstraints152.insets = new Insets(0, 0, 0, 0);
        gridBagConstraints152.fill = GridBagConstraints.BOTH;
        gridBagConstraints152.gridy = 28;
        gridBagConstraints152.weightx = 1.0;
        gridBagConstraints152.anchor = GridBagConstraints.WEST;
        gridBagConstraints152.gridwidth = 4;
        gridBagConstraints152.gridx = 4;
        jPanel.add(getJTextFieldPrepType(), gridBagConstraints152);

        GridBagConstraints gridBagConstraintsPR = new GridBagConstraints();
        gridBagConstraintsPR.insets = new Insets(0, 0, 0, 0);
        gridBagConstraintsPR.gridx = 0;
        gridBagConstraintsPR.fill = GridBagConstraints.BOTH;
        gridBagConstraintsPR.gridwidth = 8;
        gridBagConstraintsPR.weighty = 1.0;
        gridBagConstraintsPR.gridy = 29;

        jPanel.add(getJScrollPaneSpecimenParts(), gridBagConstraintsPR);
        GridBagConstraints gbc_lblMicrohabitat = new GridBagConstraints();
        gbc_lblMicrohabitat.anchor = GridBagConstraints.EAST;
        gbc_lblMicrohabitat.insets = new Insets(0, 0, 0, 5);
        gbc_lblMicrohabitat.gridx = 0;
        gbc_lblMicrohabitat.gridy = 34;
        jPanel.add(getLblMicrohabitat(), gbc_lblMicrohabitat);
        GridBagConstraints gbc_textField = new GridBagConstraints();
        gbc_textField.insets = new Insets(0, 0, 0, 5);
        gbc_textField.fill = GridBagConstraints.HORIZONTAL;
        gbc_textField.gridx = 1;
        gbc_textField.gridy = 34;
        jPanel.add(getTextField(), gbc_textField);
        jPanel.add(getJButton(), gridBagConstraints10);
        jPanel.add(jLabel5, gridBagConstraints21);
        jPanel.add(getJTextFieldCollection(), gridBagConstraints31);
        jPanel.add(jLabel6, gridBagConstraints41);
        jPanel.add(getJTextField14(), gridBagConstraints12);
        jPanel.add(getJScrollPaneCollectors(), gridBagConstraints51);
        jPanel.add(jLabel7, gridBagConstraints22);
        jPanel.add(jLabel8, gridBagConstraints13);
        jPanel.add(getJTextFieldDateUpdated(), gridBagConstraints23);
        jPanel.add(getJTextField22(), gridBagConstraints14);
        jPanel.add(jLabel9, gridBagConstraints24);
        jPanel.add(getJTextField32(), gridBagConstraints32);
        jPanel.add(jLabel10, gridBagConstraints42);
        jPanel.add(jLabel11, gridBagConstraints15);
        jPanel.add(getJScrollPaneNumbers(), gridBagConstraints25);
        jPanel.add(getJButtonNumbersAdd(), gridBagConstraints33);
        jPanel.add(getJButtonCollsAdd(), gridBagConstraints43);
        jPanel.add(getJScrollPaneWarn(), gridBagConstraints52);
        jPanel.add(jLabel12, gridBagConstraints61);
        jPanel.add(getJTextField(), gridBagConstraints71);
        jPanel.add(jLabel13, gridBagConstraints81);
        jPanel.add(jLabel14, gridBagConstraints91);
        jPanel.add(jLabel15, gridBagConstraints101);
        jPanel.add(getJTextField4(), gridBagConstraints111);
        jPanel.add(getJTextField13(), gridBagConstraints121);
        jPanel.add(getJTextField23(), gridBagConstraints131);
        jPanel.add(jLabel16, gridBagConstraints16);
        jPanel.add(jLabel17, gridBagConstraints26);
        jPanel.add(jLabelTribe, gbc_jLabelTribe);
        jPanel.add(getJTextField5(), gridBagConstraints44);
        jPanel.add(getJTextFieldSubfamily(), gridBagConstraints53);
        jPanel.add(getJTextFieldTribe(), gridBagConstraints62);
        jPanel.add(jLabel20, gridBagConstraints82);
        jPanel.add(jLabel21, gridBagConstraints92);
        jPanel.add(getJComboBoxSex(), gridBagConstraints102);
        jPanel.add(getJComboBoxLifeStage(), gridBagConstraints27);
        jPanel.add(jLabel22, gridBagConstraints35);
        jPanel.add(getJTextFieldVerbatimDate(), gridBagConstraints63);
        jPanel.add(jLabel27, gridBagConstraints110);
        jPanel.add(jLabel29, gridBagConstraints112);
        jPanel.add(getJTextFieldAuthorship(), gridBagConstraints210);
        jPanel.add(jLabel30, gridBagConstraints36);
        jPanel.add(getJTextFieldUnnamedForm(), gridBagConstraints46);
        jPanel.add(jLabel28, gridBagConstraints74);
        jPanel.add(getJTextFieldInfraspecificRank(), gridBagConstraints84);
        jPanel.add(getJTextFieldInfraspecificName(), gridBagConstraints93);
        jPanel.add(jLabel25, gridBagConstraints103);
        jPanel.add(jLabel26, gridBagConstraints113);
        jPanel.add(getJTextFieldDateEmergedIndicator(), gridBagConstraints122);
        jPanel.add(getJTextFieldDateCollectedIndicator(), gridBagConstraints132);
        jPanel.add(getJTextFieldDateEmerged(), gridBagConstraints141);
        jPanel.add(getJTextFieldDateCollected(), gridBagConstraints151);
        jPanel.add(jLabelElevation, gbc_jLabelElevation);
        jPanel.add(getJTextField11(), gridBagConstraints18);
        jPanel.add(getJTextFieldCollectingMethod(), gridBagConstraints19);
        jPanel.add(getJButtonGeoreference(), gbc_georef);
        jPanel.add(jLabel34, gridBagConstraints47);
        jPanel.add(jLabel35, gridBagConstraints65);
        jPanel.add(getJCheckBox(), gridBagConstraints83);
        jPanel.add(jLabel36, gridBagConstraints94);
        jPanel.add(jLabel38, gridBagConstraints114);
        jPanel.add(jLabel39, gridBagConstraints123);
        jPanel.add(jLabel40, gridBagConstraints133);
        jPanel.add(getJTextField20(), gridBagConstraints142);
        jPanel.add(getJTextField26(), gridBagConstraints162);
        jPanel.add(getJTextFieldHabitat(), gridBagConstraints172);
        jPanel.add(jLabel41, gridBagConstraints115);
        jPanel.add(getJComboBoxWorkflowStatus(), gridBagConstraints29);
        jPanel.add(jLabel42, gridBagConstraints37);
        jPanel.add(getJComboBox2(), gridBagConstraints48);
        jPanel.add(jLabel43, gridBagConstraints56);
        jPanel.add(getJTextFieldInferences(), gridBagConstraintsInfer);
        jPanel.add(getJButton1(), gridBagConstraints116);
        jPanel.add(getJPanel1(), gridBagConstraints211);
        jPanel.add(getJTextFieldISODate(), gridBagConstraints117);
        jPanel.add(getJButtonDets(), gridBagConstraints212);
        jPanel.add(jLabel31, gridBagConstraints118);
        jPanel.add(getJTextField9(), gridBagConstraints213);
        jPanel.add(getJButtonNext(), gridBagConstraints119);
        jPanel.add(getJButtonPrevious(), gridBagConstraints214);
        jPanel.add(getJScrollPaneNotes(), gridBagConstraints49);
        jPanel.add(jLabel44, gridBagConstraints120);
        jPanel.add(getJButton13(), gridBagConstraints215);
        jPanel.add(getJButton2(), gridBagConstraints38);
        jPanel.add(getJButtonSpecificLocality(), gridBagConstraints124);
        jPanel.add(getJTextFieldImgCount(), gridBagConstraintsImgCount);
        jPanel.add(getJLabelMigrationStatus(), gridBagConstraintsMS);
    }
    return jPanel;
}

From source file:es.emergya.ui.plugins.admin.aux1.SummaryAction.java

private JPanel buildCabecera(final String label_cabecera, final int textfieldSize, final Icon icono,
        final String titulo, final String icono_seleccionado) {
    JLabel title = new JLabel(titulo, icono, SwingConstants.LEFT);
    title.setFont(LogicConstants.deriveBoldFont(12f));
    JPanel resultado = new JPanel(new BorderLayout(2, 2));
    resultado.setOpaque(false);//from  ww w .  jav  a 2  s  . c o m
    resultado.add(title, BorderLayout.NORTH);
    JPanel cabecera = new JPanel(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    cabecera.setOpaque(false);

    JLabel nombre = new JLabel(label_cabecera, JLabel.RIGHT);
    gbc.gridx = 0;
    gbc.gridy = 0;
    cabecera.add(nombre, gbc);
    textfieldCabecera.setColumns(textfieldSize);
    textfieldCabecera.getDocument().addDocumentListener(changeListener);
    nombre.setLabelFor(textfieldCabecera);
    gbc.gridx++;
    cabecera.add(textfieldCabecera, gbc);

    if (icono_seleccionado != null) {
        JLabel nombre2 = new JLabel("Icono:", JLabel.RIGHT);
        gbc.gridx = 0;
        gbc.gridy++;
        cabecera.add(nombre2, gbc);
        ((DefaultComboBoxModel) iconos.getModel()).removeAllElements();
        for (String icon : FlotaConsultas.getAllIcons("/images/" + LogicConstants.DIRECTORIO_ICONOS_FLOTAS)) {
            ((DefaultComboBoxModel) iconos.getModel()).addElement(icon);
        }
        for (ActionListener l : iconos.getActionListeners()) {
            iconos.removeActionListener(l);
        }
        iconos.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                cambios = true;
                if (iconos.getSelectedItem() != null) {
                    i.setIcon(LogicConstants.getIcon(LogicConstants.DIRECTORIO_ICONOS_FLOTAS
                            + iconos.getSelectedItem().toString() + "_flota_preview"));
                }
                i.updateUI();
            }
        });
        iconos.setSelectedItem(icono_seleccionado);
        if (iconos.getSelectedIndex() == -1 || i.getIcon() == null) {
            if (iconos.getModel().getSize() > 0)
                iconos.setSelectedIndex(0);
        }
        cambios = false;
        nombre2.setLabelFor(iconos);
        gbc.gridx++;
        gbc.anchor = GridBagConstraints.WEST;
        cabecera.add(iconos, gbc);

        gbc.gridheight = 2;
        gbc.gridx = 2;
        gbc.gridy = 0;
        gbc.insets = new Insets(2, 10, 2, 10);
        gbc.ipadx = 5;
        gbc.ipady = 5;
        i.setBorder(BorderFactory.createLineBorder(Color.black));
        cabecera.add(i, gbc);
    }

    resultado.add(cabecera, BorderLayout.CENTER);
    resultado.setBorder(new EmptyBorder(15, 15, 15, 15));
    return resultado;
}

From source file:de.tor.tribes.ui.views.DSWorkbenchStatsFrame.java

/** This method is called from within the constructor to
 * initialize the form.//from  w w  w.jav a 2  s  .c o  m
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jMainStatPanel = new javax.swing.JPanel();
    jChartPanel = new javax.swing.JPanel();
    jPanel7 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jAllyList = new javax.swing.JList();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTribeList = new javax.swing.JList();
    jShowPoints = new javax.swing.JCheckBox();
    jShowRank = new javax.swing.JCheckBox();
    jShowVillages = new javax.swing.JCheckBox();
    jShowKillsOff = new javax.swing.JCheckBox();
    jShowRankOff = new javax.swing.JCheckBox();
    jShowKillsDef = new javax.swing.JCheckBox();
    jShowRankDef = new javax.swing.JCheckBox();
    jShowItemValues = new javax.swing.JCheckBox();
    jShowLegend = new javax.swing.JCheckBox();
    jShowLines = new javax.swing.JCheckBox();
    jShowDataPoints = new javax.swing.JCheckBox();
    jViewSelectionBox = new javax.swing.JComboBox();
    jStatCreatePanel = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jScrollPane7 = new javax.swing.JScrollPane();
    jPointsPane = new javax.swing.JEditorPane();
    jScrollPane10 = new javax.swing.JScrollPane();
    jBashOffPane = new javax.swing.JEditorPane();
    jScrollPane11 = new javax.swing.JScrollPane();
    jBashDefPane = new javax.swing.JEditorPane();
    jScrollPane12 = new javax.swing.JScrollPane();
    jWinnerLoserPane = new javax.swing.JEditorPane();
    jButton8 = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jLabel4 = new javax.swing.JLabel();
    jStartDate = new de.tor.tribes.ui.components.DateTimeField();
    jLabel5 = new javax.swing.JLabel();
    jEndDate = new de.tor.tribes.ui.components.DateTimeField();
    jPanel11 = new javax.swing.JPanel();
    jWeeklyStats = new javax.swing.JButton();
    jMonthlyStats = new javax.swing.JButton();
    jUseTop10Box = new javax.swing.JCheckBox();
    jAlwaysOnTopBox = new javax.swing.JCheckBox();
    jStatsPanel = new org.jdesktop.swingx.JXPanel();
    capabilityInfoPanel1 = new de.tor.tribes.ui.components.CapabilityInfoPanel();

    jMainStatPanel.setMinimumSize(new java.awt.Dimension(516, 300));
    jMainStatPanel.setLayout(new java.awt.BorderLayout());

    jChartPanel.setBackground(new java.awt.Color(239, 235, 223));
    jChartPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jChartPanel.setPreferredSize(new java.awt.Dimension(499, 300));
    jChartPanel.setLayout(new java.awt.BorderLayout());
    jMainStatPanel.add(jChartPanel, java.awt.BorderLayout.CENTER);

    jPanel7.setPreferredSize(new java.awt.Dimension(516, 150));
    jPanel7.setLayout(new java.awt.GridBagLayout());

    jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder("berwachte Stmme"));
    jScrollPane1.setMinimumSize(new java.awt.Dimension(258, 100));
    jScrollPane1.setPreferredSize(new java.awt.Dimension(258, 150));

    jScrollPane1.setViewportView(jAllyList);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel7.add(jScrollPane1, gridBagConstraints);

    jScrollPane2.setBorder(javax.swing.BorderFactory.createTitledBorder("berwachte Spieler"));
    jScrollPane2.setMinimumSize(new java.awt.Dimension(258, 100));
    jScrollPane2.setPreferredSize(new java.awt.Dimension(258, 150));

    jScrollPane2.setViewportView(jTribeList);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel7.add(jScrollPane2, gridBagConstraints);

    jMainStatPanel.add(jPanel7, java.awt.BorderLayout.NORTH);

    jShowPoints.setSelected(true);
    jShowPoints.setText("Punkte anzeigen");
    jShowPoints.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowRank.setText("Rang anzeigen");
    jShowRank.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowVillages.setText("Drfer anzeigen");
    jShowVillages.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowKillsOff.setText("Kills (Off) anzeigen");
    jShowKillsOff.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowRankOff.setText("Rang (Off) anzeigen");
    jShowRankOff.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowKillsDef.setText("Kills (Deff) anzeigen");
    jShowKillsDef.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowRankDef.setText("Rang (Deff) anzeigen");
    jShowRankDef.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowItemValues.setText("Werte anzeigen");
    jShowItemValues.setToolTipText("Zeigt die Werte der Datenpunkte im Diagramm an");
    jShowItemValues.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowLegend.setSelected(true);
    jShowLegend.setText("Legende anzeigen");
    jShowLegend.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowLines.setSelected(true);
    jShowLines.setText("Linien anzeigen");
    jShowLines.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jShowDataPoints.setSelected(true);
    jShowDataPoints.setText("Datenpunkte anzeigen");
    jShowDataPoints.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireUpdateChartEvent(evt);
        }
    });

    jViewSelectionBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Punkte", "Rang (Punkte)",
            "Drfer", "Kills (Off)", "Rang (Off)", "Kills (Def)", "Rang (Def)" }));
    jViewSelectionBox.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireViewChangedEvent(evt);
        }
    });

    jStatCreatePanel.setBackground(new java.awt.Color(239, 235, 223));

    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Auswertung"));

    jPointsPane.setContentType("text/html"); // NOI18N
    jPointsPane.setEditable(false);
    jScrollPane7.setViewportView(jPointsPane);

    jTabbedPane1.addTab("Punkte", new javax.swing.ImageIcon(getClass().getResource("/res/goblet_gold.png")),
            jScrollPane7); // NOI18N

    jBashOffPane.setContentType("text/html"); // NOI18N
    jBashOffPane.setEditable(false);
    jScrollPane10.setViewportView(jBashOffPane);

    jTabbedPane1.addTab("Bash (Off)", new javax.swing.ImageIcon(getClass().getResource("/res/barracks.png")),
            jScrollPane10); // NOI18N

    jBashDefPane.setContentType("text/html"); // NOI18N
    jBashDefPane.setEditable(false);
    jScrollPane11.setViewportView(jBashDefPane);

    jTabbedPane1.addTab("Bash (Deff)", new javax.swing.ImageIcon(getClass().getResource("/res/ally.png")),
            jScrollPane11); // NOI18N

    jWinnerLoserPane.setContentType("text/html"); // NOI18N
    jWinnerLoserPane.setEditable(false);
    jScrollPane12.setViewportView(jWinnerLoserPane);

    jTabbedPane1.addTab("Gewinner/Verlierer",
            new javax.swing.ImageIcon(getClass().getResource("/res/up_plus.png")), jScrollPane12); // NOI18N

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 553, Short.MAX_VALUE)
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)
                    .addContainerGap()));

    jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/select.png"))); // NOI18N
    jButton8.setText("Auswertung erstellen");
    jButton8.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            fireGenerateStatsEvent(evt);
        }
    });

    jPanel1.setOpaque(false);
    jPanel1.setLayout(new java.awt.GridBagLayout());

    jLabel4.setText("Zeitraum (Start)");
    jPanel1.add(jLabel4, new java.awt.GridBagConstraints());

    jStartDate.setTimeEnabled(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
    jPanel1.add(jStartDate, gridBagConstraints);

    jLabel5.setText("Zeitraum (Ende)");
    jPanel1.add(jLabel5, new java.awt.GridBagConstraints());

    jEndDate.setTimeEnabled(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);
    jPanel1.add(jEndDate, gridBagConstraints);

    jPanel11.setOpaque(false);
    jPanel11.setPreferredSize(new java.awt.Dimension(520, 100));
    jPanel11.setLayout(new java.awt.GridBagLayout());

    jWeeklyStats.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/calendar_7.png"))); // NOI18N
    jWeeklyStats.setText("Statistik fr eine Woche (Heute - 7 Tage)");
    jWeeklyStats.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
    jWeeklyStats.setMaximumSize(new java.awt.Dimension(40, 25));
    jWeeklyStats.setMinimumSize(new java.awt.Dimension(40, 25));
    jWeeklyStats.setPreferredSize(new java.awt.Dimension(260, 25));
    jWeeklyStats.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            fireChangeStatTimeEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
    jPanel11.add(jWeeklyStats, gridBagConstraints);

    jMonthlyStats.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/calendar_31.png"))); // NOI18N
    jMonthlyStats.setText("Statistik fr einen Monat (Heute - 31 Tage)");
    jMonthlyStats.setMaximumSize(new java.awt.Dimension(40, 25));
    jMonthlyStats.setMinimumSize(new java.awt.Dimension(40, 25));
    jMonthlyStats.setPreferredSize(new java.awt.Dimension(260, 25));
    jMonthlyStats.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            fireChangeStatTimeEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    jPanel11.add(jMonthlyStats, gridBagConstraints);

    jUseTop10Box.setText("Nur Top-10 anzeigen");

    javax.swing.GroupLayout jStatCreatePanelLayout = new javax.swing.GroupLayout(jStatCreatePanel);
    jStatCreatePanel.setLayout(jStatCreatePanelLayout);
    jStatCreatePanelLayout.setHorizontalGroup(jStatCreatePanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jStatCreatePanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(jStatCreatePanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jStatCreatePanelLayout.createSequentialGroup()
                                    .addGroup(jStatCreatePanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 589,
                                                    Short.MAX_VALUE)
                                            .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, 589,
                                                    Short.MAX_VALUE))
                                    .addContainerGap())
                            .addGroup(jStatCreatePanelLayout.createSequentialGroup()
                                    .addGroup(jStatCreatePanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addGroup(jStatCreatePanelLayout.createSequentialGroup()
                                                    .addPreferredGap(
                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                            287, Short.MAX_VALUE)
                                                    .addComponent(jUseTop10Box).addGap(18, 18, 18)
                                                    .addComponent(jButton8)))
                                    .addGap(14, 14, 14)))));
    jStatCreatePanelLayout.setVerticalGroup(jStatCreatePanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jStatCreatePanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 51,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addGroup(jStatCreatePanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jUseTop10Box, javax.swing.GroupLayout.PREFERRED_SIZE, 24,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton8))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    setTitle("Statistiken");
    getContentPane().setLayout(new java.awt.GridBagLayout());

    jAlwaysOnTopBox.setText("Immer im Vordergrund");
    jAlwaysOnTopBox.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            fireAlwaysOnTopEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    getContentPane().add(jAlwaysOnTopBox, gridBagConstraints);

    jStatsPanel.setBackground(new java.awt.Color(239, 235, 223));
    jStatsPanel.setMinimumSize(new java.awt.Dimension(700, 500));
    jStatsPanel.setPreferredSize(new java.awt.Dimension(700, 500));
    jStatsPanel.setLayout(new java.awt.BorderLayout());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jStatsPanel, gridBagConstraints);

    capabilityInfoPanel1.setCopyable(false);
    capabilityInfoPanel1.setPastable(false);
    capabilityInfoPanel1.setSearchable(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    getContentPane().add(capabilityInfoPanel1, gridBagConstraints);

    pack();
}