Example usage for javax.swing SwingConstants HORIZONTAL

List of usage examples for javax.swing SwingConstants HORIZONTAL

Introduction

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

Prototype

int HORIZONTAL

To view the source code for javax.swing SwingConstants HORIZONTAL.

Click Source Link

Document

Horizontal orientation.

Usage

From source file:AccessibleScrollDemo.java

public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) {

    int currentPosition = 0;
    if (orientation == SwingConstants.HORIZONTAL)
        currentPosition = visibleRect.x;
    else/*from ww w  . j av a  2s .c o  m*/
        currentPosition = visibleRect.y;

    if (direction < 0) {
        int newPosition = currentPosition - (currentPosition / maxUnitIncrement) * maxUnitIncrement;
        return (newPosition == 0) ? maxUnitIncrement : newPosition;
    } else {
        return ((currentPosition / maxUnitIncrement) + 1) * maxUnitIncrement - currentPosition;
    }
}

From source file:org.gwaspi.gui.reports.SampleQAHetzygPlotZoom.java

private void initGUI(final JFreeChart zoomChart, final ChartPanel zoomPanel) throws IOException {

    //      setCursor(CursorUtils.WAIT_CURSOR);

    final JPanel pnl_ChartNavigator = new JPanel();
    final JPanel pnl_Chart = new JPanel();
    final JScrollPane scrl_Chart = new JScrollPane();
    final JPanel pnl_Footer = new JPanel();
    final JPanel pnl_FooterGroup1 = new JPanel();
    final JPanel pnl_FooterGroup0 = new JPanel();
    final JButton btn_Save = new JButton();
    final JButton btn_Reset = new JButton();

    final JLabel lbl_thresholds = new JLabel();
    final JLabel lbl_hetzy = new JLabel();
    final JTextField txt_hetzy = new JTextField();
    final JButton btn_redraw = new JButton();
    final JLabel lbl_missing = new JLabel();
    final JTextField txt_missing = new JTextField();

    final String titlePlot = Text.Reports.smplHetzyVsMissingRat;

    pnl_ChartNavigator.setBorder(GWASpiExplorerPanel.createMainTitledBorder(titlePlot)); // NOI18N

    pnl_Chart.setBorder(GWASpiExplorerPanel.createLineBorder());

    scrl_Chart.getViewport().add(zoomPanel);
    pnl_Chart.add(scrl_Chart, BorderLayout.CENTER);

    // <editor-fold defaultstate="expanded" desc="LAYOUT1">
    GroupLayout pnl_ChartLayout = new GroupLayout(pnl_Chart);
    pnl_Chart.setLayout(pnl_ChartLayout);
    pnl_ChartLayout.setHorizontalGroup(pnl_ChartLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addComponent(scrl_Chart, GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE));
    pnl_ChartLayout.setVerticalGroup(pnl_ChartLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addComponent(scrl_Chart, GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE));

    GroupLayout pnl_ChartNavigatorLayout = new GroupLayout(pnl_ChartNavigator);
    pnl_ChartNavigator.setLayout(pnl_ChartNavigatorLayout);
    pnl_ChartNavigatorLayout.setHorizontalGroup(pnl_ChartNavigatorLayout
            .createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING,
                    pnl_ChartNavigatorLayout
                            .createSequentialGroup().addContainerGap().addComponent(pnl_Chart,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addContainerGap()));
    pnl_ChartNavigatorLayout// w w w  .j  a  v a  2s .  c  om
            .setVerticalGroup(pnl_ChartNavigatorLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(pnl_ChartNavigatorLayout
                            .createSequentialGroup().addContainerGap().addComponent(pnl_Chart,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addContainerGap()));
    // </editor-fold>

    lbl_thresholds.setText(Text.Reports.thresholds);

    lbl_hetzy.setText(Text.Reports.heterozygosity);
    txt_hetzy.setText(hetzyThreshold.toString());

    lbl_missing.setText(Text.Reports.missRatio);
    txt_missing.setText(missingThreshold.toString());
    btn_redraw.setAction(new RedrawAction(txt_hetzy, txt_missing));

    final MatrixMetadata rdMatrixMetadata = getMatrixService().getMatrix(operationKey.getParentMatrixKey());
    final String originFriendlyName = rdMatrixMetadata.getFriendlyName();
    btn_Save.setAction(new SaveAsAction(
            "SampleQA_hetzyg-missingrat_" + Utils.stripNonAlphaNumeric(originFriendlyName) + ".png", scrl_Chart,
            zoomChart, this));

    btn_Reset.setAction(new ResetAction());

    //<editor-fold defaultstate="expanded" desc="FOOTER">
    GroupLayout pnl_FooterGroup0Layout = new GroupLayout(pnl_FooterGroup0);
    pnl_FooterGroup0.setLayout(pnl_FooterGroup0Layout);
    pnl_FooterGroup0Layout.setHorizontalGroup(pnl_FooterGroup0Layout
            .createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(pnl_FooterGroup0Layout.createSequentialGroup().addContainerGap()
                    .addGroup(pnl_FooterGroup0Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(pnl_FooterGroup0Layout.createSequentialGroup()
                                    .addGroup(pnl_FooterGroup0Layout
                                            .createParallelGroup(GroupLayout.Alignment.LEADING)
                                            .addComponent(lbl_hetzy).addComponent(lbl_missing))
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(pnl_FooterGroup0Layout
                                            .createParallelGroup(GroupLayout.Alignment.LEADING)
                                            .addComponent(txt_hetzy, GroupLayout.PREFERRED_SIZE, 113,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addGroup(pnl_FooterGroup0Layout.createSequentialGroup()
                                                    .addComponent(txt_missing, GroupLayout.PREFERRED_SIZE, 113,
                                                            GroupLayout.PREFERRED_SIZE)
                                                    .addGap(6, 6, 6).addComponent(btn_redraw,
                                                            GroupLayout.PREFERRED_SIZE, 103,
                                                            GroupLayout.PREFERRED_SIZE))))
                            .addComponent(lbl_thresholds))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    pnl_FooterGroup0Layout.setVerticalGroup(pnl_FooterGroup0Layout
            .createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(GroupLayout.Alignment.TRAILING, pnl_FooterGroup0Layout.createSequentialGroup()
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(lbl_thresholds)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(pnl_FooterGroup0Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(lbl_hetzy).addComponent(txt_hetzy, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(pnl_FooterGroup0Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(btn_redraw, GroupLayout.Alignment.TRAILING, 0, 0, Short.MAX_VALUE)
                            .addGroup(GroupLayout.Alignment.TRAILING,
                                    pnl_FooterGroup0Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                            .addComponent(lbl_missing).addComponent(txt_missing)))));

    GroupLayout pnl_FooterGroup1Layout = new GroupLayout(pnl_FooterGroup1);
    pnl_FooterGroup1.setLayout(pnl_FooterGroup1Layout);
    pnl_FooterGroup1Layout
            .setHorizontalGroup(pnl_FooterGroup1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(pnl_FooterGroup1Layout.createSequentialGroup().addContainerGap()
                            .addComponent(btn_Reset, GroupLayout.PREFERRED_SIZE, 79, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btn_Save, GroupLayout.PREFERRED_SIZE, 84, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    pnl_FooterGroup1Layout.linkSize(SwingConstants.HORIZONTAL, new Component[] { btn_Reset, btn_Save });
    pnl_FooterGroup1Layout
            .setVerticalGroup(pnl_FooterGroup1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(pnl_FooterGroup1Layout.createParallelGroup(GroupLayout.Alignment.CENTER)
                            .addComponent(btn_Reset).addComponent(btn_Save)));

    pnl_FooterGroup1Layout.linkSize(SwingConstants.VERTICAL, new Component[] { btn_Reset, btn_Save });

    GroupLayout pnl_FooterLayout = new GroupLayout(pnl_Footer);
    pnl_Footer.setLayout(pnl_FooterLayout);
    pnl_FooterLayout
            .setHorizontalGroup(pnl_FooterLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(GroupLayout.Alignment.TRAILING, pnl_FooterLayout.createSequentialGroup()
                            .addComponent(pnl_FooterGroup0, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 174, Short.MAX_VALUE)
                            .addComponent(pnl_FooterGroup1, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));
    pnl_FooterLayout.setVerticalGroup(pnl_FooterLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(GroupLayout.Alignment.TRAILING, pnl_FooterLayout.createSequentialGroup()
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(pnl_FooterLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
                            .addComponent(pnl_FooterGroup0, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(pnl_FooterGroup1, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));
    //</editor-fold>

    //<editor-fold defaultstate="expanded" desc="LAYOUT">
    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addComponent(pnl_ChartNavigator, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(pnl_Footer, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE))
            .addContainerGap()));
    layout.setVerticalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(
                            layout.createSequentialGroup()
                                    .addComponent(pnl_ChartNavigator, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(pnl_Footer, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap()));

    //</editor-fold>

    //      setCursor(CursorUtils.DEFAULT_CURSOR);
}

From source file:AccessibleScrollDemo.java

public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) {
    if (orientation == SwingConstants.HORIZONTAL)
        return visibleRect.width - maxUnitIncrement;
    else/* w  w w . j ava  2  s  . c  o  m*/
        return visibleRect.height - maxUnitIncrement;
}

From source file:coreferenceresolver.gui.MarkupGUI.java

private JScrollPane newReviewPanel(Review review, int reviewId) throws BadLocationException {
    //Model/*from w  w w .ja  va 2s .  c  om*/
    ReviewElement reviewElement = new ReviewElement();

    ScrollablePanel reviewPanel = new ScrollablePanel();
    reviewPanel.setLayout(new BoxLayout(reviewPanel, BoxLayout.PAGE_AXIS));

    JTextField title = new JTextField("NEW REVIEW " + reviewId);
    title.setBackground(Color.pink);

    reviewPanel.add(title);

    JTextArea reviewContentTxtArea = new JTextArea();
    reviewContentTxtArea.setLineWrap(true);
    reviewContentTxtArea.setWrapStyleWord(true);
    reviewContentTxtArea.setEditable(false);
    reviewContentTxtArea.setText(review.getRawContent());

    int chainId = 0;
    for (CorefChain cc : review.getCorefChains()) {
        for (int npId : cc.getChain()) {
            NounPhrase np = review.getNounPhrases().get(npId);
            Object highlighTag = reviewContentTxtArea.getHighlighter().addHighlight(np.getOffsetBegin(),
                    np.getOffsetEnd() + 1, highlightPainters.get(chainId));
            this.markupReviews.get(reviewId).getNounPhrases().get(npId).highlighterTag = highlighTag;
        }
        ++chainId;
    }

    reviewPanel.add(reviewContentTxtArea);

    ScrollablePanel markupsPanel = new ScrollablePanel();
    markupsPanel.setLayout(new BoxLayout(markupsPanel, BoxLayout.PAGE_AXIS));

    for (int i = 0; i < review.getNounPhrases().size(); ++i) {
        JScrollPane newMarkupPanel = newMarkupPanel(review.getNounPhrases().get(i), reviewElement);
        markupsPanel.add(newMarkupPanel);
    }

    JScrollPane scrollMarkupsPanel = new JScrollPane(markupsPanel);

    //Add Dimension for scrolling
    Dimension curScreenDimen = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    scrollMarkupsPanel.setPreferredSize(new Dimension((int) curScreenDimen.getWidth() - 50, 400));

    reviewPanel.add(scrollMarkupsPanel);

    //MODEL
    reviewElement.reviewTextArea = reviewContentTxtArea;
    reviewElements.add(reviewElement);

    reviewPanel.add(new JSeparator(SwingConstants.HORIZONTAL));

    reviewPanel.add(Box.createVerticalStrut(20));

    JScrollPane scrollReviewPanel = new JScrollPane(reviewPanel);

    return scrollReviewPanel;
}

From source file:org.gwaspi.gui.reports.ManhattanPlotZoom.java

private void initGUI() {

    setCursor(CursorUtils.WAIT_CURSOR);/*from  w  w  w  .j  a v a2  s.  c o  m*/

    pnl_ChartNavigator = new JPanel();
    pnl_Chart = new JPanel();
    pnl_SearchDB = new JPanel();
    cmb_SearchDB = new JComboBox();
    scrl_Chart = new JScrollPane();
    pnl_Footer = new JPanel();
    pnl_FooterGroup1 = new JPanel();
    btn_Save = new JButton();
    btn_Reset = new JButton();
    btn_Back = new JButton();
    btn_Back2 = new JButton();

    final String titlePlot;
    if (origMarkerKey == null) {
        titlePlot = ": Chr" + currentChr + " - Pos: " + startPhysPos + " to "
                + (startPhysPos + requestedPosWindow);
    } else {
        titlePlot = ": " + origMarkerKey.toString() + " - Chr" + currentChr;
    }

    pnl_ChartNavigator
            .setBorder(GWASpiExplorerPanel.createMainTitledBorder("Manhattan Plot Navigator" + titlePlot)); // NOI18N

    pnl_Chart.setBorder(GWASpiExplorerPanel.createLineBorder());

    scrl_Chart.getViewport().add(zoomPanel);
    pnl_Chart.add(scrl_Chart, BorderLayout.CENTER);

    // <editor-fold defaultstate="expanded" desc="LAYOUT1">
    GroupLayout pnl_ChartLayout = new GroupLayout(pnl_Chart);
    pnl_Chart.setLayout(pnl_ChartLayout);
    pnl_ChartLayout.setHorizontalGroup(pnl_ChartLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addComponent(scrl_Chart, GroupLayout.DEFAULT_SIZE, 812, Short.MAX_VALUE));
    pnl_ChartLayout.setVerticalGroup(pnl_ChartLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addComponent(scrl_Chart, GroupLayout.DEFAULT_SIZE, 437, Short.MAX_VALUE));

    GroupLayout pnl_ChartNavigatorLayout = new GroupLayout(pnl_ChartNavigator);
    pnl_ChartNavigator.setLayout(pnl_ChartNavigatorLayout);
    pnl_ChartNavigatorLayout.setHorizontalGroup(pnl_ChartNavigatorLayout
            .createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING,
                    pnl_ChartNavigatorLayout
                            .createSequentialGroup().addContainerGap().addComponent(pnl_Chart,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addContainerGap()));
    pnl_ChartNavigatorLayout
            .setVerticalGroup(pnl_ChartNavigatorLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(pnl_ChartNavigatorLayout
                            .createSequentialGroup().addContainerGap().addComponent(pnl_Chart,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addContainerGap()));
    // </editor-fold>

    String lblChr = "Chr ";
    Long currPos = 0L;
    lblChr += currentChr;
    if (centerPhysPos > 0) {
        currPos = centerPhysPos;
    } else {
        currPos = Math.round((double) MARKERS_NUM_DEFAULT / 2);
    }

    //<editor-fold defaultstate="expanded" desc="TRACKER">
    //      pnl_Tracker.setBorder(GWASpiExplorerPanel.createRegularTitledBorder("Marker N on "+lblChr));
    //
    //
    //      slid_Tracker.setMaximum(max);
    //      slid_Tracker.setValue(currPos);
    //      slid_Tracker.addMouseListener(new event.MouseAdapter() {
    //         public void mouseReleased(event.MouseEvent evt) {
    //            actionSlide();
    //         }
    //      });
    //
    //      GroupLayout pnl_TrackerLayout = new GroupLayout(pnl_Tracker);
    //      pnl_Tracker.setLayout(pnl_TrackerLayout);
    //      pnl_TrackerLayout.setHorizontalGroup(
    //            pnl_TrackerLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    //            .addGroup(GroupLayout.Alignment.TRAILING, pnl_TrackerLayout.createSequentialGroup()
    //            .addGap(18, 18, 18)
    //            .addComponent(slid_Tracker, GroupLayout.DEFAULT_SIZE, 814, Short.MAX_VALUE)
    //            .addContainerGap())
    //            );
    //      pnl_TrackerLayout.setVerticalGroup(
    //            pnl_TrackerLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    //            .addGroup(pnl_TrackerLayout.createSequentialGroup()
    //            .addContainerGap()
    //            .addComponent(slid_Tracker, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
    //            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    //            );
    //</editor-fold>

    //<editor-fold defaultstate="expanded" desc="EXTERNAL RESOURCE DBs">
    pnl_SearchDB = new JPanel();
    pnl_SearchDB.setBorder(GWASpiExplorerPanel.createRegularTitledBorder(Text.Reports.externalResourceDB));
    cmb_SearchDB = new JComboBox();
    cmb_SearchDB.setModel(new DefaultComboBoxModel(LinksExternalResouces.getLinkNames()));

    GroupLayout pnl_SearchDBLayout = new GroupLayout(pnl_SearchDB);
    pnl_SearchDB.setLayout(pnl_SearchDBLayout);
    pnl_SearchDBLayout.setHorizontalGroup(pnl_SearchDBLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(pnl_SearchDBLayout.createSequentialGroup().addContainerGap()
                    .addComponent(cmb_SearchDB, 0, 614, Short.MAX_VALUE).addContainerGap()));
    pnl_SearchDBLayout.setVerticalGroup(pnl_SearchDBLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(pnl_SearchDBLayout
                    .createSequentialGroup().addComponent(cmb_SearchDB, GroupLayout.PREFERRED_SIZE,
                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(14, Short.MAX_VALUE)));
    //</editor-fold>

    btn_Save.setAction(new SampleQAHetzygPlotZoom.SaveAsAction("zoom_" + origMarkerKey + ".png", scrl_Chart,
            zoomChart, this));

    btn_Reset.setAction(new ResetAction(testOpKey));

    btn_Back.setAction(new BackToTableAction());

    btn_Back2.setAction(new BackToManhattanPlotAction());

    // <editor-fold defaultstate="expanded" desc="FOOTER">
    GroupLayout pnl_FooterGroup1Layout = new GroupLayout(pnl_FooterGroup1);
    pnl_FooterGroup1.setLayout(pnl_FooterGroup1Layout);
    pnl_FooterGroup1Layout.setHorizontalGroup(pnl_FooterGroup1Layout
            .createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING,
                    pnl_FooterGroup1Layout.createSequentialGroup().addContainerGap()
                            .addComponent(btn_Reset, GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)
                            .addGap(18, 18, 18)
                            .addComponent(btn_Save, GroupLayout.PREFERRED_SIZE, 96, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));

    pnl_FooterGroup1Layout.linkSize(SwingConstants.HORIZONTAL, new Component[] { btn_Reset, btn_Save });

    pnl_FooterGroup1Layout
            .setVerticalGroup(pnl_FooterGroup1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(pnl_FooterGroup1Layout.createSequentialGroup()
                            .addGroup(pnl_FooterGroup1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(btn_Save).addComponent(btn_Reset))
                            .addContainerGap(16, Short.MAX_VALUE)));

    pnl_FooterGroup1Layout.linkSize(SwingConstants.VERTICAL, new Component[] { btn_Reset, btn_Save });

    GroupLayout pnl_FooterLayout = new GroupLayout(pnl_Footer);
    pnl_Footer.setLayout(pnl_FooterLayout);
    pnl_FooterLayout.setHorizontalGroup(pnl_FooterLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(pnl_FooterLayout.createSequentialGroup().addContainerGap().addComponent(btn_Back)
                    .addGap(18, 18, 18).addComponent(btn_Back2)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 368, Short.MAX_VALUE)
                    .addComponent(pnl_FooterGroup1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
    pnl_FooterLayout.setVerticalGroup(pnl_FooterLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(pnl_FooterLayout.createSequentialGroup().addContainerGap().addGroup(pnl_FooterLayout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(GroupLayout.Alignment.TRAILING, pnl_FooterLayout.createSequentialGroup()
                            .addGroup(pnl_FooterLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(btn_Back).addComponent(btn_Back2))
                            .addGap(71, 71, 71))
                    .addGroup(GroupLayout.Alignment.TRAILING,
                            pnl_FooterLayout.createSequentialGroup()
                                    .addComponent(pnl_FooterGroup1, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addGap(55, 55, 55)))));
    // </editor-fold>

    // <editor-fold defaultstate="expanded" desc="LAYOUT">
    //      GroupLayout layout = new GroupLayout(this);
    //      this.setLayout(layout);
    //      layout.setHorizontalGroup(
    //            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
    //            .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    //            .addContainerGap()
    //            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
    //            .addComponent(pnl_Tracker, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    //            .addComponent(pnl_ChartNavigator, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    //            .addComponent(pnl_Footer, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    //            .addContainerGap())
    //            );
    //      layout.setVerticalGroup(
    //            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
    //            .addGroup(layout.createSequentialGroup()
    //            .addComponent(pnl_ChartNavigator, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
    //            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    //            .addComponent(pnl_Tracker, GroupLayout.PREFERRED_SIZE, 86, GroupLayout.PREFERRED_SIZE)
    //            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    //            .addComponent(pnl_Footer, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
    //            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    //            );

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addComponent(pnl_SearchDB, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnl_ChartNavigator, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(pnl_Footer, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addContainerGap()));
    layout.setVerticalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(pnl_ChartNavigator, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(pnl_SearchDB, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(pnl_Footer,
                                    GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));
    // </editor-fold>

    setCursor(CursorUtils.DEFAULT_CURSOR);
}

From source file:de.huxhorn.lilith.swing.ViewActions.java

public ViewActions(MainFrame mainFrame) {
    this.mainFrame = mainFrame;

    containerChangeListener = new ChangeListener() {
        /**/*www.  j a v  a2 s  .  c  om*/
         * Invoked when the target of the listener has changed its state.
         *
         * @param e a ChangeEvent object
         */
        public void stateChanged(ChangeEvent e) {
            updateActions();
        }
    };

    containerPropertyChangeListener = new PropertyChangeListener() {

        /**
         * This method gets called when a bound property is changed.
         *
         * @param evt A PropertyChangeEvent object describing the event source
         *            and the property that has changed.
         */

        public void propertyChange(PropertyChangeEvent evt) {
            if (ViewContainer.SELECTED_EVENT_PROPERTY_NAME.equals(evt.getPropertyName())) {
                setEventWrapper((EventWrapper) evt.getNewValue());
            }

        }
    };

    keyStrokeActionMapping = new HashMap<KeyStroke, CopyToClipboardAction>();
    // ##### Menu Actions #####
    // File
    OpenMenuAction openMenuAction = new OpenMenuAction();
    clearRecentFilesAction = new ClearRecentFilesAction();
    OpenInactiveLogMenuAction openInactiveLogMenuAction = new OpenInactiveLogMenuAction();
    ImportMenuAction importMenuAction = new ImportMenuAction();
    exportMenuAction = new ExportMenuAction();
    CleanAllInactiveLogsMenuAction cleanAllInactiveLogsMenuAction = new CleanAllInactiveLogsMenuAction();
    preferencesMenuAction = new PreferencesMenuAction();
    ExitMenuAction exitMenuAction = new ExitMenuAction();

    // Edit
    showUnfilteredEventAction = new ShowUnfilteredEventAction();
    gotoSourceAction = new GotoSourceAction();
    copySelectionAction = new CopySelectionAction();
    copyEventAction = new CopyToClipboardAction(new EventFormatter());
    copyLoggingActions = new ArrayList<CopyToClipboardAction>();
    copyLoggingActions.add(new CopyToClipboardAction(new EventJsonFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new EventXmlFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new LoggingMessageFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new LoggingMessagePatternFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new LoggingLoggerNameFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new LoggingThrowableFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new LoggingCallStackFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new LoggingCallLocationFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new LoggingMarkerFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new LoggingMdcFormatter()));
    copyLoggingActions.add(new CopyToClipboardAction(new LoggingNdcFormatter()));
    copyAccessActions = new ArrayList<CopyToClipboardAction>();
    copyAccessActions.add(new CopyToClipboardAction(new AccessUriFormatter()));

    prepareClipboardActions(copyLoggingActions, keyStrokeActionMapping);
    prepareClipboardActions(copyAccessActions, keyStrokeActionMapping);

    // Search
    findMenuAction = new FindMenuAction();
    findPreviousAction = new FindPreviousAction();
    findNextAction = new FindNextAction();
    findPreviousActiveAction = new FindPreviousActiveAction();
    findNextActiveAction = new FindNextActiveAction();
    resetFindAction = new ResetFindAction();

    // View
    scrollToBottomMenuAction = new ScrollToBottomMenuAction();
    pauseMenuAction = new PauseMenuAction();
    clearMenuAction = new ClearMenuAction();
    attachMenuAction = new AttachMenuAction();
    disconnectMenuAction = new DisconnectMenuAction();

    focusMessageAction = new FocusMessageAction();
    focusEventsAction = new FocusEventsAction();

    //statisticsMenuAction = new StatisticsMenuAction();
    editSourceNameMenuAction = new EditSourceNameMenuAction();
    saveLayoutAction = new SaveLayoutAction();
    resetLayoutAction = new ResetLayoutAction();
    saveConditionMenuAction = new SaveConditionMenuAction();

    zoomInMenuAction = new ZoomInMenuAction();
    zoomOutMenuAction = new ZoomOutMenuAction();
    resetZoomMenuAction = new ResetZoomMenuAction();

    previousTabAction = new PreviousTabAction();
    nextTabAction = new NextTabAction();
    closeFilterAction = new CloseFilterAction();
    closeOtherFiltersAction = new CloseOtherFiltersAction();
    closeAllFiltersAction = new CloseAllFiltersAction();

    // Window
    ShowTaskManagerAction showTaskManagerAction = new ShowTaskManagerAction();
    closeAllAction = new CloseAllAction();
    closeOtherAction = new CloseOtherAction();
    minimizeAllAction = new MinimizeAllAction();
    minimizeAllOtherAction = new MinimizeAllOtherAction();
    removeInactiveAction = new RemoveInactiveAction();
    //clearAndRemoveInactiveAction=new ClearAndRemoveInactiveAction();

    // Help
    KeyboardHelpAction keyboardHelpAction = new KeyboardHelpAction();
    ShowLoveMenuAction showLoveMenuAction = new ShowLoveMenuAction();
    TipOfTheDayAction tipOfTheDayAction = new TipOfTheDayAction();
    DebugAction debugAction = new DebugAction();
    aboutAction = new AboutAction();
    CheckForUpdateAction checkForUpdateAction = new CheckForUpdateAction();
    TroubleshootingAction troubleshootingAction = new TroubleshootingAction();

    // ##### ToolBar Actions #####
    scrollToBottomToolBarAction = new ScrollToBottomToolBarAction();
    pauseToolBarAction = new PauseToolBarAction();
    clearToolBarAction = new ClearToolBarAction();
    findToolBarAction = new FindToolBarAction();
    //statisticsToolBarAction = new StatisticsToolBarAction();
    attachToolBarAction = new AttachToolBarAction();
    disconnectToolBarAction = new DisconnectToolBarAction();

    showTaskManagerItem = new JMenuItem(showTaskManagerAction);
    closeAllItem = new JMenuItem(closeAllAction);
    closeAllOtherItem = new JMenuItem(closeOtherAction);
    minimizeAllItem = new JMenuItem(minimizeAllAction);
    minimizeAllOtherItem = new JMenuItem(minimizeAllOtherAction);
    removeInactiveItem = new JMenuItem(removeInactiveAction);
    //clearAndRemoveInactiveItem = new JMenuItem(clearAndRemoveInactiveAction);

    toolbar = new JToolBar(SwingConstants.HORIZONTAL);
    toolbar.setFloatable(false);

    scrollToBottomButton = new JToggleButton(scrollToBottomToolBarAction);
    toolbar.add(scrollToBottomButton);

    JButton pauseButton = new JButton(pauseToolBarAction);
    toolbar.add(pauseButton);

    JButton clearButton = new JButton(clearToolBarAction);
    toolbar.add(clearButton);

    JButton findButton = new JButton(findToolBarAction);
    toolbar.add(findButton);

    JButton disconnectButton = new JButton(disconnectToolBarAction);
    toolbar.add(disconnectButton);

    toolbar.addSeparator();

    //JButton statisticsButton = new JButton(statisticsToolBarAction);
    //toolbar.add(statisticsButton);
    //toolbar.addSeparator();

    JButton attachButton = new JButton(attachToolBarAction);
    toolbar.add(attachButton);

    toolbar.addSeparator();

    PreferencesToolBarAction preferencesToolBarAction = new PreferencesToolBarAction();
    JButton preferencesButton = new JButton(preferencesToolBarAction);
    toolbar.add(preferencesButton);

    toolbar.addSeparator();

    ShowLoveToolbarAction showLoveToolbarAction = new ShowLoveToolbarAction();
    JButton showLoveButton = new JButton(showLoveToolbarAction);
    toolbar.add(showLoveButton);

    recentFilesMenu = new JMenu("Recent Files");

    Application app = mainFrame.getApplication();

    menubar = new JMenuBar();

    // File
    JMenu fileMenu = new JMenu("File");
    fileMenu.setMnemonic('f');
    fileMenu.add(openMenuAction);
    fileMenu.add(recentFilesMenu);
    fileMenu.add(openInactiveLogMenuAction);
    fileMenu.add(cleanAllInactiveLogsMenuAction);
    fileMenu.add(importMenuAction);
    fileMenu.add(exportMenuAction);
    if (!app.isMac()) {
        fileMenu.addSeparator();
        fileMenu.add(preferencesMenuAction);
        fileMenu.addSeparator();
        fileMenu.add(exitMenuAction);
    }

    // Edit
    editMenu = new JMenu("Edit");
    editMenu.setMnemonic('e');
    editMenu.add(copySelectionAction);
    editMenu.addSeparator();
    editMenu.add(copyEventAction);
    editMenu.addSeparator();
    for (CopyToClipboardAction current : copyLoggingActions) {
        editMenu.add(current);
    }
    editMenu.addSeparator();
    for (CopyToClipboardAction current : copyAccessActions) {
        editMenu.add(current);
    }
    editMenu.addSeparator();
    customCopyMenu = new JMenu("Custom copy");
    customCopyPopupMenu = new JMenu("Custom copy");
    editMenu.add(customCopyMenu);
    editMenu.addSeparator();
    PasteStackTraceElementAction pasteStackTraceElementAction = new PasteStackTraceElementAction();
    editMenu.add(pasteStackTraceElementAction);

    // Search
    searchMenu = new JMenu("Search");
    searchMenu.setMnemonic('s');
    searchMenu.add(findMenuAction);
    searchMenu.add(resetFindAction);
    searchMenu.add(findPreviousAction);
    searchMenu.add(findNextAction);
    searchMenu.add(findPreviousActiveAction);
    searchMenu.add(findNextActiveAction);
    searchMenu.addSeparator();
    searchMenu.add(saveConditionMenuAction);
    searchMenu.addSeparator();

    focusMenu = new FocusMenu(mainFrame.getApplicationPreferences());
    excludeMenu = new ExcludeMenu(mainFrame.getApplicationPreferences());
    searchMenu.add(focusMenu);
    searchMenu.add(excludeMenu);

    // View
    viewMenu = new JMenu("View");
    viewMenu.setMnemonic('v');
    viewMenu.add(scrollToBottomMenuAction);
    viewMenu.add(pauseMenuAction);
    viewMenu.add(clearMenuAction);
    viewMenu.add(attachMenuAction);
    viewMenu.add(disconnectMenuAction);
    viewMenu.add(focusEventsAction);
    viewMenu.add(focusMessageAction);
    //viewMenu.add(statisticsMenuAction);
    viewMenu.add(editSourceNameMenuAction);
    viewMenu.addSeparator();
    viewMenu.add(zoomInMenuAction);
    viewMenu.add(zoomOutMenuAction);
    viewMenu.add(resetZoomMenuAction);
    viewMenu.addSeparator();
    JMenu layoutMenu = new JMenu("Layout");
    columnsMenu = new JMenu("Columns");
    layoutMenu.add(columnsMenu);
    layoutMenu.addSeparator();
    layoutMenu.add(saveLayoutAction);
    layoutMenu.add(resetLayoutAction);
    viewMenu.add(layoutMenu);
    viewMenu.addSeparator();
    viewMenu.add(previousTabAction);
    viewMenu.add(nextTabAction);
    viewMenu.addSeparator();
    viewMenu.add(closeFilterAction);
    viewMenu.add(closeOtherFiltersAction);
    viewMenu.add(closeAllFiltersAction);

    // Window
    windowMenu = new JMenu("Window");
    windowMenu.setMnemonic('w');

    // Help
    JMenu helpMenu = new JMenu("Help");
    helpMenu.setMnemonic('h');

    helpMenu.add(keyboardHelpAction);
    helpMenu.add(showLoveMenuAction);
    helpMenu.add(tipOfTheDayAction);
    helpMenu.add(checkForUpdateAction);
    helpMenu.add(troubleshootingAction);
    helpMenu.addSeparator();
    helpMenu.add(debugAction);
    if (!app.isMac()) {
        helpMenu.addSeparator();
        helpMenu.add(aboutAction);
    }

    menubar.add(fileMenu);
    menubar.add(editMenu);
    menubar.add(searchMenu);
    menubar.add(viewMenu);
    menubar.add(windowMenu);
    menubar.add(helpMenu);

    updateWindowMenu();
    updateRecentFiles();
    updateActions();
}

From source file:DateTimeEditor.java

protected void createComponents() {
    if (m_orientation == SwingConstants.VERTICAL) {
        setLayout(new GridLayout(2, 1));
        m_incrementButton = new BasicArrowButton(SwingConstants.NORTH);
        m_decrementButton = new BasicArrowButton(SwingConstants.SOUTH);
        add(m_incrementButton);/*from w  ww  .  j  a v a 2  s. c  o  m*/
        add(m_decrementButton);
    } else if (m_orientation == SwingConstants.HORIZONTAL) {
        setLayout(new GridLayout(1, 2));
        m_incrementButton = new BasicArrowButton(SwingConstants.EAST);
        m_decrementButton = new BasicArrowButton(SwingConstants.WEST);
        add(m_decrementButton);
        add(m_incrementButton);
    }
}

From source file:me.mayo.telnetkek.MainPanel.java

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    splitPane = new javax.swing.JSplitPane();
    jPanel3 = new javax.swing.JPanel();
    mainOutputScoll = new javax.swing.JScrollPane();
    mainOutput = new javax.swing.JTextPane();
    btnDisconnect = new javax.swing.JButton();
    btnSend = new javax.swing.JButton();
    txtServer = new javax.swing.JComboBox<>();
    chkAutoScroll = new javax.swing.JCheckBox();
    txtCommand = new javax.swing.JTextField();
    btnConnect = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel2 = new javax.swing.JPanel();
    tblPlayersScroll = new javax.swing.JScrollPane();
    tblPlayers = new javax.swing.JTable();
    jLabel3 = new javax.swing.JLabel();
    txtNumPlayers = new javax.swing.JTextField();
    jPanel1 = new javax.swing.JPanel();
    chkIgnorePlayerCommands = new javax.swing.JCheckBox();
    chkIgnoreServerCommands = new javax.swing.JCheckBox();
    chkShowChatOnly = new javax.swing.JCheckBox();
    chkIgnoreErrors = new javax.swing.JCheckBox();
    jPanel4 = new javax.swing.JPanel();
    favoriteButtonsPanelHolder = new javax.swing.JPanel();
    favoriteButtonsPanelScroll = new javax.swing.JScrollPane();
    favoriteButtonsPanel = new me.mayo.telnetkek.button.FavoriteButtonsPanel(favButtonList);

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("BukkitTelnetClient");

    splitPane.setBackground(new java.awt.Color(68, 68, 68));
    splitPane.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(68, 68, 68), 5));
    splitPane.setResizeWeight(1.0);/* w  ww .  ja v a  2  s. c  o m*/

    jPanel3.setBackground(new java.awt.Color(68, 68, 68));

    mainOutput.setEditable(false);
    mainOutput.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    mainOutput.setForeground(new java.awt.Color(255, 255, 255));
    mainOutputScoll.setViewportView(mainOutput);

    btnDisconnect.setBackground(new java.awt.Color(68, 68, 68));
    btnDisconnect.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    btnDisconnect.setText("Leave");
    btnDisconnect.setEnabled(false);
    btnDisconnect.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDisconnectActionPerformed(evt);
        }
    });

    btnSend.setBackground(new java.awt.Color(68, 68, 68));
    btnSend.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    btnSend.setText("Send");
    btnSend.setEnabled(false);
    btnSend.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSendActionPerformed(evt);
        }
    });

    txtServer.setBackground(new java.awt.Color(91, 91, 91));
    txtServer.setEditable(true);
    txtServer.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    txtServer.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            txtServerActionPerformed(evt);
        }
    });

    chkAutoScroll.setBackground(new java.awt.Color(68, 68, 68));
    chkAutoScroll.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    chkAutoScroll.setForeground(new java.awt.Color(255, 255, 255));
    chkAutoScroll.setSelected(true);
    chkAutoScroll.setText("Auto Scroll");

    txtCommand.setEnabled(false);
    txtCommand.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyPressed(java.awt.event.KeyEvent evt) {
            txtCommandKeyPressed(evt);
        }
    });

    btnConnect.setBackground(new java.awt.Color(68, 68, 68));
    btnConnect.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    btnConnect.setText("Join");
    btnConnect.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnConnectActionPerformed(evt);
        }
    });

    jLabel1.setBackground(new java.awt.Color(68, 68, 68));
    jLabel1.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    jLabel1.setForeground(new java.awt.Color(255, 255, 255));
    jLabel1.setText("Command:");

    jLabel2.setBackground(new java.awt.Color(68, 68, 68));
    jLabel2.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    jLabel2.setForeground(new java.awt.Color(255, 255, 255));
    jLabel2.setText("Server:");

    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()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(mainOutputScoll)
                            .addGroup(jPanel3Layout.createSequentialGroup().addGroup(jPanel3Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel1)).addGap(18, 18, 18)
                                    .addGroup(jPanel3Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtCommand)
                                            .addComponent(txtServer, 0, 411, Short.MAX_VALUE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel3Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(btnConnect, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(btnSend, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel3Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(btnDisconnect).addComponent(chkAutoScroll))))
                    .addContainerGap()));

    jPanel3Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL,
            new java.awt.Component[] { btnConnect, btnDisconnect, btnSend, chkAutoScroll });

    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addComponent(mainOutputScoll, javax.swing.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtCommand, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1).addComponent(btnSend).addComponent(chkAutoScroll))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2).addComponent(btnConnect).addComponent(btnDisconnect)
                            .addComponent(txtServer, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    splitPane.setLeftComponent(jPanel3);

    jTabbedPane1.setBackground(new java.awt.Color(68, 68, 68));
    jTabbedPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    jTabbedPane1.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N

    jPanel2.setBackground(new java.awt.Color(68, 68, 68));

    tblPlayers.setAutoCreateRowSorter(true);
    tblPlayers.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    tblPlayers.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    tblPlayersScroll.setViewportView(tblPlayers);
    tblPlayers.getColumnModel().getSelectionModel()
            .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

    jLabel3.setBackground(new java.awt.Color(68, 68, 68));
    jLabel3.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    jLabel3.setForeground(new java.awt.Color(255, 255, 255));
    jLabel3.setText("Number of Players:");

    txtNumPlayers.setEditable(false);
    txtNumPlayers.setBackground(new java.awt.Color(255, 255, 255));
    txtNumPlayers.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jPanel2Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tblPlayersScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup().addComponent(jLabel3)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(txtNumPlayers, javax.swing.GroupLayout.PREFERRED_SIZE, 65,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, 0)))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addComponent(tblPlayersScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3).addComponent(txtNumPlayers,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    jTabbedPane1.addTab("Player List", jPanel2);

    jPanel1.setBackground(new java.awt.Color(68, 68, 68));
    jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(68, 68, 68)));

    chkIgnorePlayerCommands.setBackground(new java.awt.Color(68, 68, 68));
    chkIgnorePlayerCommands.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    chkIgnorePlayerCommands.setForeground(new java.awt.Color(255, 255, 255));
    chkIgnorePlayerCommands.setSelected(true);
    chkIgnorePlayerCommands.setText("Ignore \"[PLAYER_COMMAND]\" messages");

    chkIgnoreServerCommands.setBackground(new java.awt.Color(68, 68, 68));
    chkIgnoreServerCommands.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    chkIgnoreServerCommands.setForeground(new java.awt.Color(255, 255, 255));
    chkIgnoreServerCommands.setSelected(true);
    chkIgnoreServerCommands.setText("Ignore \"issued server command\" messages");
    chkIgnoreServerCommands.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            chkIgnoreServerCommandsActionPerformed(evt);
        }
    });

    chkShowChatOnly.setBackground(new java.awt.Color(68, 68, 68));
    chkShowChatOnly.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    chkShowChatOnly.setForeground(new java.awt.Color(255, 255, 255));
    chkShowChatOnly.setText("Show chat only");
    chkShowChatOnly.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            chkShowChatOnlyActionPerformed(evt);
        }
    });

    chkIgnoreErrors.setBackground(new java.awt.Color(68, 68, 68));
    chkIgnoreErrors.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N
    chkIgnoreErrors.setForeground(new java.awt.Color(255, 255, 255));
    chkIgnoreErrors.setText("Ignore warnings and errors");
    chkIgnoreErrors.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            chkIgnoreErrorsActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(chkIgnorePlayerCommands).addComponent(chkIgnoreServerCommands)
                            .addComponent(chkShowChatOnly).addComponent(chkIgnoreErrors))
                    .addContainerGap(68, Short.MAX_VALUE)));
    jPanel1Layout
            .setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                            .addComponent(chkIgnorePlayerCommands, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(chkIgnoreServerCommands, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(chkShowChatOnly, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(chkIgnoreErrors, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(307, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Filters", jPanel1);

    jPanel4.setBackground(new java.awt.Color(68, 68, 68));
    jPanel4.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N

    favoriteButtonsPanelHolder.setLayout(new java.awt.BorderLayout());

    favoriteButtonsPanelScroll.setBorder(null);

    favoriteButtonsPanel.setBackground(new java.awt.Color(68, 68, 68));
    favoriteButtonsPanel.setLayout(null);
    favoriteButtonsPanelScroll.setViewportView(favoriteButtonsPanel);

    favoriteButtonsPanelHolder.add(favoriteButtonsPanelScroll, java.awt.BorderLayout.CENTER);

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout
            .setHorizontalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout
                            .createSequentialGroup().addGap(0, 0, 0).addComponent(favoriteButtonsPanelHolder,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE)
                            .addGap(0, 0, 0)));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap()
                    .addComponent(favoriteButtonsPanelHolder, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    jTabbedPane1.addTab("Commands", jPanel4);

    splitPane.setRightComponent(jTabbedPane1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(0, 0, 0).addComponent(splitPane).addGap(0, 0, 0)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(splitPane, javax.swing.GroupLayout.Alignment.TRAILING));

    pack();
}

From source file:ch.fork.AdHocRailway.ui.AdHocRailway.java

private JPanel initStatusBar() {
    final JPanel statusBarPanel = new JPanel();
    commandHistoryModel = new DefaultComboBoxModel<String>();
    commandHistory = new JComboBox<String>(commandHistoryModel);
    commandHistory.setEditable(false);//from www .j  a va  2 s .c o  m
    commandHistory.setFocusable(false);

    progressBar = new JProgressBar(SwingConstants.HORIZONTAL);

    statusBarPanel.setLayout(new BorderLayout(5, 0));
    statusBarPanel.add(progressBar, BorderLayout.WEST);
    statusBarPanel.add(commandHistory, BorderLayout.CENTER);
    return statusBarPanel;
}

From source file:com.igormaznitsa.zxpspritecorrector.files.FileNameDialog.java

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

    buttonCancel = new javax.swing.JButton();
    buttonOk = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    textFileName0 = new javax.swing.JTextField();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    textZxFileName0 = new javax.swing.JFormattedTextField();
    textZxFileType0 = new javax.swing.JFormattedTextField();
    jPanel2 = new javax.swing.JPanel();
    jLabel4 = new javax.swing.JLabel();
    textFileName1 = new javax.swing.JTextField();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    textZxFileName1 = new javax.swing.JFormattedTextField();
    textZxFileType1 = new javax.swing.JFormattedTextField();
    jPanel3 = new javax.swing.JPanel();
    jLabel10 = new javax.swing.JLabel();
    textFileName3 = new javax.swing.JTextField();
    jLabel11 = new javax.swing.JLabel();
    jLabel12 = new javax.swing.JLabel();
    textZxFileName3 = new javax.swing.JFormattedTextField();
    textZxFileType3 = new javax.swing.JFormattedTextField();
    jPanel4 = new javax.swing.JPanel();
    jLabel7 = new javax.swing.JLabel();
    textFileName2 = new javax.swing.JTextField();
    jLabel8 = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    textZxFileName2 = new javax.swing.JFormattedTextField();
    textZxFileType2 = new javax.swing.JFormattedTextField();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    buttonCancel.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/igormaznitsa/zxpspritecorrector/icons/cross.png"))); // NOI18N
    buttonCancel.setText("Cancel");
    buttonCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonCancelActionPerformed(evt);
        }
    });

    buttonOk.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/igormaznitsa/zxpspritecorrector/icons/tick.png"))); // NOI18N
    buttonOk.setText("Ok");
    buttonOk.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonOkActionPerformed(evt);
        }
    });

    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Block CPU0"));

    jLabel1.setText("File name:");

    jLabel2.setText("ZX File name:");

    jLabel3.setText("ZX File type:");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(6, 6, 6).addComponent(jLabel3)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(textZxFileType0, javax.swing.GroupLayout.PREFERRED_SIZE, 130,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel2).addComponent(jLabel1))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(
                                    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(textFileName0).addComponent(textZxFileName0))))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(textFileName0, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2).addComponent(textZxFileName0,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3).addComponent(textZxFileType0,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(20, Short.MAX_VALUE)));

    jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { jLabel1, jLabel2,
            jLabel3, textFileName0, textZxFileName0, textZxFileType0 });

    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Block CPU1"));

    jLabel4.setText("File name:");

    jLabel5.setText("ZX File name:");

    jLabel6.setText("ZX File type:");

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jPanel2Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup().addGap(6, 6, 6).addComponent(jLabel6)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(textZxFileType1, javax.swing.GroupLayout.PREFERRED_SIZE, 133,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                            .addGroup(jPanel2Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel5).addComponent(jLabel4))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(
                                    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(textFileName1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    511, Short.MAX_VALUE)
                                            .addComponent(textZxFileName1))))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(textFileName1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5).addComponent(textZxFileName1,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6).addComponent(textZxFileType1,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(20, Short.MAX_VALUE)));

    jPanel2Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { jLabel4, jLabel5,
            jLabel6, textFileName1, textZxFileName1, textZxFileType1 });

    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Block CPU3"));

    jLabel10.setText("File name:");

    jLabel11.setText("ZX File name:");

    jLabel12.setText("ZX File type:");

    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().addGroup(jPanel3Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup().addGap(6, 6, 6).addComponent(jLabel12)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(textZxFileType3, javax.swing.GroupLayout.PREFERRED_SIZE, 131,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                            .addGroup(jPanel3Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel11).addComponent(jLabel10))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(
                                    jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(textFileName3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    511, Short.MAX_VALUE)
                                            .addComponent(textZxFileName3))))
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(textFileName3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel10))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel11).addComponent(textZxFileName3,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel12).addComponent(textZxFileType3,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(20, Short.MAX_VALUE)));

    jPanel3Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { jLabel10, jLabel11,
            jLabel12, textFileName3, textZxFileName3, textZxFileType3 });

    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Block CPU2"));

    jLabel7.setText("File name:");

    jLabel8.setText("ZX File name:");

    jLabel9.setText("ZX File type:");

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap().addGroup(jPanel4Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup().addGap(6, 6, 6).addComponent(jLabel9)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(textZxFileType2, javax.swing.GroupLayout.PREFERRED_SIZE, 134,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                            .addGroup(jPanel4Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel8).addComponent(jLabel7))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(
                                    jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(textFileName2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    511, Short.MAX_VALUE)
                                            .addComponent(textZxFileName2))))
                    .addContainerGap()));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(textFileName2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8).addComponent(textZxFileName2,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9).addComponent(textZxFileType2,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(20, Short.MAX_VALUE)));

    jPanel4Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { jLabel7, jLabel8,
            jLabel9, textFileName2, textZxFileName2, textZxFileType2 });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(buttonOk)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(buttonCancel)))
                    .addContainerGap()));

    layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { buttonCancel, buttonOk });

    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(buttonOk).addComponent(buttonCancel))
                    .addContainerGap()));

    layout.linkSize(javax.swing.SwingConstants.VERTICAL,
            new java.awt.Component[] { jPanel1, jPanel2, jPanel3, jPanel4 });

    pack();
}