Example usage for javax.swing SwingConstants TOP

List of usage examples for javax.swing SwingConstants TOP

Introduction

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

Prototype

int TOP

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

Click Source Link

Document

Box-orientation constant used to specify the top of a box.

Usage

From source file:Clavis.Windows.WShedule.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 ww w . j av  a 2  s . c o m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jPanelInicial = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new org.jdesktop.swingx.JXTable();
    ;
    jButtonSair = new javax.swing.JButton();
    jXDatePickerInicio = new org.jdesktop.swingx.JXDatePicker();
    jXDatePickerFim = new org.jdesktop.swingx.JXDatePicker();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jButtonImprimir = new javax.swing.JButton();
    jComboBoxEstado = new javax.swing.JComboBox<>();
    jLabel3 = new javax.swing.JLabel();
    jButtonExportar = new javax.swing.JButton();

    setMinimumSize(new java.awt.Dimension(900, 600));
    setSize(new java.awt.Dimension(900, 600));

    jPanelInicial.setBorder(javax.swing.BorderFactory.createCompoundBorder(
            javax.swing.BorderFactory.createLineBorder(painelcor, 4),
            javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))));
    jPanelInicial.setMinimumSize(new java.awt.Dimension(900, 500));
    jPanelInicial.setPreferredSize(new java.awt.Dimension(900, 500));

    org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder1 = new org.jdesktop.swingx.border.DropShadowBorder();
    dropShadowBorder1.setCornerSize(6);
    dropShadowBorder1.setShadowSize(3);
    dropShadowBorder1.setShowLeftShadow(true);
    jScrollPane1.setBorder(javax.swing.BorderFactory.createCompoundBorder(dropShadowBorder1,
            javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))));

    jTable1.setBorder(null);
    if (mat.getTypeOfMaterial().getMaterialTypeID() == 1) {
        jTable1.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {},
                new String[] { lingua.translate("Utilizador"), lingua.translate("Horrio"),
                        lingua.translate("Data"), lingua.translate("Atividade"),
                        lingua.translate("Disciplina") }));
        jTable1.getColumnModel().getColumn(0).setPreferredWidth(250);
        jTable1.getColumnModel().getColumn(1).setMinWidth(90);
        jTable1.getColumnModel().getColumn(2).setMinWidth(90);
        jTable1.getColumnModel().getColumn(3).setMinWidth(150);
        jTable1.getColumnModel().getColumn(4).setMinWidth(150);
    } else {
        jTable1.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {},
                new String[] { lingua.translate("Utilizador"), lingua.translate("Data inicial"),
                        lingua.translate("Data final"), lingua.translate("Atividade") }));
        jTable1.getColumnModel().getColumn(0).setPreferredWidth(250);
        jTable1.getColumnModel().getColumn(1).setMinWidth(90);
        jTable1.getColumnModel().getColumn(2).setMinWidth(90);
        jTable1.getColumnModel().getColumn(3).setMinWidth(150);
    }
    jScrollPane1.setViewportView(jTable1);
    Border border = BorderFactory.createEmptyBorder(5, 5, 0, 0);
    UIManager.put("Table.focusCellHighlightBorder", border);
    jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setHorizontalAlignment(javax.swing.JLabel.CENTER);
    renderer.setFocusable(false);
    javax.swing.JLabel lo = new javax.swing.JLabel();
    lo.setBackground(new Color(100, 100, 100));
    lo.setOpaque(true);
    jScrollPane1.setCorner(javax.swing.JScrollPane.UPPER_TRAILING_CORNER, lo);
    jTable1.setRowHeight(30);
    jTable1.setEditable(false);
    jTable1.setSelectionBackground(Color.DARK_GRAY);
    jTable1.getColumnModel().getColumn(1).setCellRenderer(renderer);
    jTable1.getColumnModel().getColumn(2).setCellRenderer(renderer);
    jTable1.getColumnModel().getColumn(3).setCellRenderer(renderer);
    if (mat.getTypeOfMaterial().getMaterialTypeID() == 1) {
        jTable1.getColumnModel().getColumn(4).setCellRenderer(renderer);
    }
    DefaultTableCellRenderer headerRenderer = new DefaultTableCellRenderer() {
        private static final long serialVersionUID = 2L;

        @Override
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
                boolean hasFocus, int row, int column) {
            super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            setFont(new Font("Cantarell", Font.PLAIN, 14));
            this.setBorder(BorderFactory.createMatteBorder(0, 1, 1, 0, new Color(1, 1, 1)));
            return this;
        }
    };
    DefaultTableCellRenderer headerRenderer2 = new DefaultTableCellRenderer() {
        private static final long serialVersionUID = 3L;

        @Override
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
                boolean hasFocus, int row, int column) {
            super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            setFont(new Font("Cantarell", Font.PLAIN, 14));
            this.setBorder(BorderFactory.createCompoundBorder(
                    BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(1, 1, 1)),
                    BorderFactory.createEmptyBorder(0, 20, 0, 0)));
            this.setBackground(new Color(100, 100, 100));
            setForeground(Color.WHITE);
            setPreferredSize(new Dimension(100, 40));
            return this;
        }
    };

    headerRenderer.setBackground(new Color(100, 100, 100));
    headerRenderer.setForeground(Color.WHITE);
    headerRenderer.setPreferredSize(new Dimension(100, 40));
    headerRenderer.setHorizontalAlignment(javax.swing.JLabel.CENTER);
    for (int i = 0; i < jTable1.getColumnCount(); i++) {
        if (i == 0) {
            headerRenderer2.setHorizontalAlignment(javax.swing.JLabel.LEFT);
            jTable1.getColumnModel().getColumn(i).setHeaderRenderer(headerRenderer2);
        } else {
            jTable1.getColumnModel().getColumn(i).setHeaderRenderer(headerRenderer);
        }
    }

    jButtonSair.setBackground(new java.awt.Color(1, 1, 1));
    jButtonSair.setToolTipText("");
    jButtonSair.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jButtonSair.setFocusPainted(false);
    jButtonSair.setMaximumSize(new java.awt.Dimension(90, 40));
    jButtonSair.setMinimumSize(new java.awt.Dimension(90, 40));
    jButtonSair.setPreferredSize(new java.awt.Dimension(90, 40));
    jButtonSair.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonSairActionPerformed(evt);
        }
    });

    jXDatePickerInicio.setBackground(new java.awt.Color(254, 254, 254));
    org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder2 = new org.jdesktop.swingx.border.DropShadowBorder();
    dropShadowBorder2.setCornerSize(6);
    dropShadowBorder2.setShadowSize(3);
    dropShadowBorder2.setShowLeftShadow(true);
    jXDatePickerInicio.setBorder(javax.swing.BorderFactory.createCompoundBorder(dropShadowBorder2,
            javax.swing.BorderFactory.createMatteBorder(0, 1, 1, 1, new java.awt.Color(0, 0, 0))));
    jXDatePickerInicio.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N
    jXDatePickerInicio.setMaximumSize(new java.awt.Dimension(1155551, 26));
    jXDatePickerInicio.setMinimumSize(new java.awt.Dimension(66, 26));
    jXDatePickerInicio.setPreferredSize(new java.awt.Dimension(131, 26));
    jXDatePickerInicio.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jXDatePickerInicioActionPerformed(evt);
        }
    });

    jXDatePickerFim.setBackground(new java.awt.Color(254, 254, 254));
    org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder3 = new org.jdesktop.swingx.border.DropShadowBorder();
    dropShadowBorder3.setCornerSize(6);
    dropShadowBorder3.setShadowSize(3);
    dropShadowBorder3.setShowLeftShadow(true);
    jXDatePickerFim.setBorder(javax.swing.BorderFactory.createCompoundBorder(dropShadowBorder3,
            javax.swing.BorderFactory.createMatteBorder(0, 1, 1, 1, new java.awt.Color(0, 0, 0))));
    jXDatePickerFim.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N
    jXDatePickerFim.setMaximumSize(new java.awt.Dimension(1155551, 26));
    jXDatePickerFim.setMinimumSize(new java.awt.Dimension(66, 26));
    jXDatePickerFim.setPreferredSize(new java.awt.Dimension(121, 26));

    jLabel1.setBackground(new java.awt.Color(100, 100, 100));
    jLabel1.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N
    jLabel1.setForeground(new java.awt.Color(254, 254, 254));
    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setText("Incio");
    jLabel1.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
    jLabel1.setMaximumSize(new java.awt.Dimension(3343446, 96));
    jLabel1.setMinimumSize(new java.awt.Dimension(36, 26));
    jLabel1.setOpaque(true);
    jLabel1.setPreferredSize(new java.awt.Dimension(100, 20));

    jLabel2.setBackground(new java.awt.Color(100, 100, 100));
    jLabel2.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N
    jLabel2.setForeground(new java.awt.Color(254, 254, 254));
    jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel2.setText("Fim");
    jLabel2.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jLabel2.setMaximumSize(new java.awt.Dimension(355557, 96));
    jLabel2.setMinimumSize(new java.awt.Dimension(37, 26));
    jLabel2.setOpaque(true);
    jLabel2.setPreferredSize(new java.awt.Dimension(100, 20));

    jButtonImprimir.setBackground(new java.awt.Color(51, 102, 153));
    jButtonImprimir.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jButtonImprimir.setFocusPainted(false);
    jButtonImprimir.setMaximumSize(new java.awt.Dimension(5345, 40));
    jButtonImprimir.setPreferredSize(new java.awt.Dimension(90, 40));
    jButtonImprimir.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonImprimirActionPerformed(evt);
        }
    });

    jComboBoxEstado.setBackground(new java.awt.Color(213, 213, 213));
    jComboBoxEstado.setBorder(null);
    jComboBoxEstado.setFocusable(false);
    jComboBoxEstado.setMinimumSize(new java.awt.Dimension(35, 22));
    jComboBoxEstado.setPreferredSize(new java.awt.Dimension(125, 28));
    jComboBoxEstado.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jComboBoxEstadoActionPerformed(evt);
        }
    });

    jLabel3.setBackground(new java.awt.Color(100, 100, 100));
    jLabel3.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N
    jLabel3.setForeground(new java.awt.Color(254, 254, 254));
    jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel3.setText("Estado");
    jLabel3.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jLabel3.setMaximumSize(new java.awt.Dimension(355557, 96));
    jLabel3.setMinimumSize(new java.awt.Dimension(37, 26));
    jLabel3.setOpaque(true);
    jLabel3.setPreferredSize(new java.awt.Dimension(100, 20));

    jButtonExportar.setBackground(new java.awt.Color(51, 102, 153));
    jButtonExportar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jButtonExportar.setFocusPainted(false);
    jButtonExportar.setMaximumSize(new java.awt.Dimension(5345, 40));
    jButtonExportar.setPreferredSize(new java.awt.Dimension(90, 40));
    jButtonExportar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonExportarActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanelInicialLayout = new javax.swing.GroupLayout(jPanelInicial);
    jPanelInicial.setLayout(jPanelInicialLayout);
    jPanelInicialLayout.setHorizontalGroup(jPanelInicialLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelInicialLayout.createSequentialGroup().addGap(42, 42, 42)
                    .addGroup(jPanelInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelInicialLayout.createSequentialGroup().addComponent(jScrollPane1)
                                    .addGap(42, 42, 42))
                            .addGroup(jPanelInicialLayout.createSequentialGroup().addGap(29, 29, 29)
                                    .addComponent(jButtonSair, javax.swing.GroupLayout.PREFERRED_SIZE, 90,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jButtonExportar, javax.swing.GroupLayout.PREFERRED_SIZE, 90,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jButtonImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 90,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(71, 71, 71))))
            .addGroup(jPanelInicialLayout.createSequentialGroup().addGap(71, 71, 71)
                    .addGroup(jPanelInicialLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jXDatePickerInicio, javax.swing.GroupLayout.DEFAULT_SIZE, 152,
                                    Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanelInicialLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
                            .addComponent(jXDatePickerFim, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 201, Short.MAX_VALUE)
                    .addGroup(jPanelInicialLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jComboBoxEstado, 0, 241, Short.MAX_VALUE))
                    .addGap(71, 71, 71)));
    jPanelInicialLayout
            .setVerticalGroup(jPanelInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelInicialLayout.createSequentialGroup().addGap(16, 16, 16)
                            .addGroup(jPanelInicialLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(0, 0, 0)
                            .addGroup(jPanelInicialLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jXDatePickerInicio, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            31, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jXDatePickerFim, javax.swing.GroupLayout.PREFERRED_SIZE, 31,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jComboBoxEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 28,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 465,
                                    Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanelInicialLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jButtonImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 40,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jButtonSair, javax.swing.GroupLayout.PREFERRED_SIZE, 40,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jButtonExportar, javax.swing.GroupLayout.PREFERRED_SIZE, 40,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(16, 16, 16)));

    try {
        if (Clavis.KeyQuest.class.getResource("Images/exit26x24.png") != null) {
            BufferedImage im = ImageIO.read(Clavis.KeyQuest.class.getResourceAsStream("Images/exit26x24.png"));
            ImageIcon imic = new ImageIcon(im);
            if (imic != null) {
                jButtonSair.setIcon(imic);
            }
        }
    } catch (IOException eo) {
    }

    jButtonSair.setToolTipText(lingua.translate("Voltar"));
    javax.swing.JPanel pan2 = new javax.swing.JPanel(null);
    String compoe = lingua.translate("Hoje  dia") + ": " + new TimeDate.Date().toString();
    javax.swing.JLabel fil2 = new javax.swing.JLabel(compoe);
    fil2.setBounds(0, 0, 300, 26);
    fil2.setHorizontalAlignment(SwingConstants.CENTER);
    pan2.setPreferredSize(new Dimension(300, 30));
    pan2.setBounds(0, 0, 300, 30);
    pan2.add(fil2);
    jXDatePickerInicio.setLinkPanel(pan2);

    jXDatePickerInicio.setLocale(lingua.systemlocale);
    jXDatePickerInicio.getEditor().setSelectionColor(Color.DARK_GRAY);
    jXDatePickerInicio.getEditor().setBorder(BorderFactory.createEmptyBorder());
    jXDatePickerInicio.getEditor().setHorizontalAlignment(SwingConstants.CENTER);
    javax.swing.JButton bbt2 = (javax.swing.JButton) jXDatePickerInicio.getComponent(1);
    bbt2.setBackground(Color.WHITE);

    jXDatePickerInicio.addActionListener(actionJXDatePicker());
    jXDatePickerInicio.setFormats("dd/MM/yyyy");
    javax.swing.JPanel pan = new javax.swing.JPanel(null);
    String compoe0 = lingua.translate("Hoje  dia") + ": " + new TimeDate.Date().toString();
    javax.swing.JLabel fil = new javax.swing.JLabel(compoe);
    fil.setBounds(0, 0, 300, 26);
    fil.setHorizontalAlignment(SwingConstants.CENTER);
    pan.setPreferredSize(new Dimension(300, 30));
    pan.setBounds(0, 0, 300, 30);
    pan.add(fil);
    jXDatePickerFim.setLinkPanel(pan);

    Component[] t = jXDatePickerFim.getLinkPanel().getComponents();

    jXDatePickerFim.setLocale(lingua.systemlocale);
    jXDatePickerFim.getEditor().setSelectionColor(Color.DARK_GRAY);
    jXDatePickerFim.getEditor().setBorder(BorderFactory.createEmptyBorder());
    jXDatePickerFim.getEditor().setHorizontalAlignment(SwingConstants.CENTER);
    javax.swing.JButton bbt = (javax.swing.JButton) jXDatePickerFim.getComponent(1);
    bbt.setBackground(Color.WHITE);
    jXDatePickerFim.addActionListener(actionJXDatePicker());
    jXDatePickerFim.setFormats("dd/MM/yyyy");
    jLabel1.setText(lingua.translate("Incio"));
    jLabel2.setText(lingua.translate("Fim"));
    try {
        if (Clavis.KeyQuest.class.getResource("Images/print.png") != null) {
            BufferedImage im = ImageIO.read(Clavis.KeyQuest.class.getResourceAsStream("Images/print.png"));
            ImageIcon imic = new ImageIcon(im);
            if (imic != null) {
                jButtonImprimir.setIcon(imic);
            }
        }
    } catch (IOException eo) {
    }

    jButtonImprimir.setToolTipText(lingua.translate("Imprimir"));
    jComboBoxEstado.setModel(new javax.swing.DefaultComboBoxModel<>(
            new String[] { lingua.translate("todos"), lingua.translate("terminado"),
                    lingua.translate("no realizado"), lingua.translate("por realizar") }));
    Clavis.KeyQuest.addVisualComboBox(jComboBoxEstado);
    ((javax.swing.JLabel) jComboBoxEstado.getRenderer()).setHorizontalAlignment(javax.swing.JLabel.CENTER);
    jLabel3.setText(lingua.translate("Estado"));
    try {
        if (Clavis.KeyQuest.class.getResource("Images/exportar.png") != null) {
            BufferedImage im = ImageIO.read(Clavis.KeyQuest.class.getResourceAsStream("Images/exportar.png"));
            ImageIcon imic = new ImageIcon(im);
            if (imic != null) {
                jButtonExportar.setIcon(imic);
            }
        }
    } catch (IOException eo) {
    }

    jButtonExportar.setToolTipText(lingua.translate("Exportar para excel"));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addComponent(jPanelInicial,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGap(0, 0, 0)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanelInicial, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE));
}

From source file:com.ga.forms.DailyLogAddUI.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./*  ww  w.  j a  v  a  2s  .  c  om*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    group = new javax.swing.ButtonGroup();
    jPanel1 = new javax.swing.JPanel();
    mainTitleLbl = new javax.swing.JLabel();
    jSeparator1 = new javax.swing.JSeparator();
    exitButton = new javax.swing.JButton();
    viewButton = new javax.swing.JButton();
    dailyLogPanel = new javax.swing.JPanel();
    dateLbl = new javax.swing.JLabel();
    dateDisplayLbl = new javax.swing.JLabel();
    dayLbl = new javax.swing.JLabel();
    dayDisplayLbl = new javax.swing.JLabel();
    checkInLbl = new javax.swing.JLabel();
    checkoutLbl = new javax.swing.JLabel();
    breakLbl = new javax.swing.JLabel();
    checkInTimeCombo = new javax.swing.JComboBox();
    checkOutTimeCombo = new javax.swing.JComboBox();
    checkInOutButton = new javax.swing.JToggleButton();
    breakOptionPanel = new javax.swing.JPanel();
    yesRdButton = new javax.swing.JRadioButton();
    noRdButton = new javax.swing.JRadioButton();
    customRdButton = new javax.swing.JRadioButton();
    customBreakTimeTextField = new javax.swing.JTextField();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Daily Log Manager");
    setBounds(new java.awt.Rectangle(0, 0, 395, 389));
    setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    setMinimumSize(new java.awt.Dimension(395, 389));

    jPanel1.setMaximumSize(new java.awt.Dimension(395, 389));
    jPanel1.setMinimumSize(new java.awt.Dimension(395, 389));
    jPanel1.setPreferredSize(new java.awt.Dimension(464, 474));

    mainTitleLbl.setFont(new java.awt.Font("Arial", 0, 36)); // NOI18N
    mainTitleLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    mainTitleLbl.setText("Daily Log Manager");
    mainTitleLbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

    exitButton.setText("Exit");
    exitButton.setMaximumSize(new java.awt.Dimension(72, 29));
    exitButton.setMinimumSize(new java.awt.Dimension(72, 29));
    exitButton.setPreferredSize(new java.awt.Dimension(72, 29));
    exitButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitButtonActionPerformed(evt);
        }
    });

    viewButton.setText("View");
    viewButton.setMaximumSize(new java.awt.Dimension(72, 29));
    viewButton.setMinimumSize(new java.awt.Dimension(72, 29));
    viewButton.setPreferredSize(new java.awt.Dimension(72, 29));
    viewButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            viewButtonActionPerformed(evt);
        }
    });

    dailyLogPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Add Daily Log"));
    dailyLogPanel.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    dailyLogPanel.setName("Daily Log Entry"); // NOI18N
    dailyLogPanel.setPreferredSize(new java.awt.Dimension(240, 190));

    dateLbl.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    dateLbl.setText("Date");
    dateLbl.setPreferredSize(new java.awt.Dimension(56, 17));

    dateDisplayLbl.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    dateDisplayLbl.setEnabled(false);
    dateDisplayLbl.setMaximumSize(new java.awt.Dimension(144, 17));
    dateDisplayLbl.setMinimumSize(new java.awt.Dimension(144, 17));
    dateDisplayLbl.setPreferredSize(new java.awt.Dimension(144, 17));
    dateDisplayLbl.setRequestFocusEnabled(false);

    dayLbl.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    dayLbl.setText("Day");
    dayLbl.setPreferredSize(new java.awt.Dimension(56, 17));

    dayDisplayLbl.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    dayDisplayLbl.setEnabled(false);
    dayDisplayLbl.setMaximumSize(new java.awt.Dimension(144, 17));
    dayDisplayLbl.setMinimumSize(new java.awt.Dimension(144, 17));
    dayDisplayLbl.setPreferredSize(new java.awt.Dimension(144, 17));
    dayDisplayLbl.setRequestFocusEnabled(false);

    checkInLbl.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    checkInLbl.setText("In");
    checkInLbl.setPreferredSize(new java.awt.Dimension(56, 17));

    checkoutLbl.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    checkoutLbl.setText("Out");
    checkoutLbl.setPreferredSize(new java.awt.Dimension(56, 17));

    breakLbl.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    breakLbl.setText("Break");
    breakLbl.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    breakLbl.setPreferredSize(new java.awt.Dimension(56, 17));

    checkInTimeCombo.setModel(
            new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    checkInTimeCombo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkInTimeComboActionPerformed(evt);
        }
    });

    checkOutTimeCombo.setModel(
            new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    checkOutTimeCombo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkOutTimeComboActionPerformed(evt);
        }
    });

    checkInOutButton.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    checkInOutButton.setText("Check In");
    checkInOutButton.setMaximumSize(new java.awt.Dimension(102, 29));
    checkInOutButton.setMinimumSize(new java.awt.Dimension(102, 29));
    checkInOutButton.setPreferredSize(new java.awt.Dimension(102, 29));
    checkInOutButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkInOutButtonActionPerformed(evt);
        }
    });

    breakOptionPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Options"));
    breakOptionPanel.setPreferredSize(new java.awt.Dimension(255, 98));

    yesRdButton.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    yesRdButton.setText("Yes");
    yesRdButton.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            yesRdButtonMouseClicked(evt);
        }
    });

    noRdButton.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    noRdButton.setSelected(true);
    noRdButton.setText("No");
    noRdButton.setPreferredSize(new java.awt.Dimension(51, 24));
    noRdButton.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            noRdButtonMouseClicked(evt);
        }
    });

    customRdButton.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    customRdButton.setText("Custom");
    customRdButton.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            customRdButtonItemStateChanged(evt);
        }
    });
    customRdButton.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            customRdButtonStateChanged(evt);
        }
    });
    customRdButton.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            customRdButtonMouseClicked(evt);
        }
    });

    customBreakTimeTextField.setText("00:30");
    customBreakTimeTextField.setEnabled(false);

    javax.swing.GroupLayout breakOptionPanelLayout = new javax.swing.GroupLayout(breakOptionPanel);
    breakOptionPanel.setLayout(breakOptionPanelLayout);
    breakOptionPanelLayout.setHorizontalGroup(breakOptionPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(breakOptionPanelLayout.createSequentialGroup().addGap(5, 5, 5)
                    .addGroup(breakOptionPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(customBreakTimeTextField, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(breakOptionPanelLayout.createSequentialGroup().addComponent(yesRdButton)
                                    .addGap(5, 5, 5)
                                    .addComponent(noRdButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(5, 5, 5).addComponent(customRdButton)
                                    .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    breakOptionPanelLayout.setVerticalGroup(breakOptionPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(breakOptionPanelLayout.createSequentialGroup().addGap(5, 5, 5)
                    .addGroup(breakOptionPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(yesRdButton)
                            .addComponent(noRdButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(customRdButton))
                    .addGap(5, 5, 5).addComponent(customBreakTimeTextField,
                            javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.PREFERRED_SIZE)));

    yesRdButton.getAccessibleContext().setAccessibleName("breakRdButton");
    noRdButton.getAccessibleContext().setAccessibleName("breakRdButton");
    customRdButton.getAccessibleContext().setAccessibleName("breakRdButton");
    customBreakTimeTextField.getAccessibleContext().setAccessibleName("customBreakTimeTextField");

    javax.swing.GroupLayout dailyLogPanelLayout = new javax.swing.GroupLayout(dailyLogPanel);
    dailyLogPanel.setLayout(dailyLogPanelLayout);
    dailyLogPanelLayout.setHorizontalGroup(dailyLogPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dailyLogPanelLayout.createSequentialGroup().addContainerGap().addGroup(dailyLogPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            dailyLogPanelLayout.createSequentialGroup().addGroup(dailyLogPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, dailyLogPanelLayout
                                            .createSequentialGroup()
                                            .addComponent(dayLbl, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(dayDisplayLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    304, Short.MAX_VALUE))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, dailyLogPanelLayout
                                            .createSequentialGroup()
                                            .addComponent(dateLbl, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(
                                                    dateDisplayLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                    .addGap(44, 44, 44))
                    .addGroup(dailyLogPanelLayout.createSequentialGroup().addGroup(dailyLogPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(dailyLogPanelLayout.createSequentialGroup()
                                    .addComponent(checkInLbl, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(checkInTimeCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(dailyLogPanelLayout.createSequentialGroup().addGroup(dailyLogPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(checkoutLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(breakLbl, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(dailyLogPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(checkOutTimeCombo,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(breakOptionPanel,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 220,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addContainerGap(152, Short.MAX_VALUE))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, dailyLogPanelLayout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(checkInOutButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(21, 21, 21)));
    dailyLogPanelLayout.setVerticalGroup(dailyLogPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dailyLogPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(dailyLogPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(dateLbl, javax.swing.GroupLayout.DEFAULT_SIZE, 18, Short.MAX_VALUE)
                            .addComponent(dateDisplayLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(dailyLogPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(dayLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(dayDisplayLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 18,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(dailyLogPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(checkInTimeCombo).addComponent(checkInLbl,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(dailyLogPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(checkOutTimeCombo).addComponent(checkoutLbl,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(dailyLogPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(dailyLogPanelLayout.createSequentialGroup()
                                    .addComponent(breakLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGap(47, 47, 47))
                            .addGroup(dailyLogPanelLayout.createSequentialGroup()
                                    .addComponent(breakOptionPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 84,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 40,
                                            Short.MAX_VALUE)
                                    .addComponent(checkInOutButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap()))));

    dayLbl.getAccessibleContext().setAccessibleName("dayLbl");
    dayDisplayLbl.getAccessibleContext().setAccessibleName("dayDisplayLbl");
    checkInTimeCombo.getAccessibleContext().setAccessibleName("checkInTimeCombo");
    checkOutTimeCombo.getAccessibleContext().setAccessibleName("checkOutTimeCombo");
    checkInOutButton.getAccessibleContext().setAccessibleName("checkInOutButton");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(dailyLogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 452,
                                    Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 287, Short.MAX_VALUE)
                                    .addComponent(viewButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(mainTitleLbl, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap())
            .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addComponent(mainTitleLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(dailyLogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 327, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 6,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(viewButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    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, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)));

    pack();
}

From source file:net.pms.newgui.LooksFrame.java

public JComponent buildMain() {
    final JTabbedPane tabbedPane = new JTabbedPane(SwingConstants.TOP);

    tabbedPane.setUI(new CustomTabbedPaneUI());

    st = new StatusTab(configuration);
    tt = new TracesTab(configuration, this);
    gt = new GeneralTab(configuration, this);
    nt = new NavigationShareTab(configuration, this);
    tr = new TranscodingTab(configuration, this);
    ht = new HelpTab();

    tabbedPane.addTab(Messages.getString("LooksFrame.18"), st.build());
    tabbedPane.addTab(Messages.getString("LooksFrame.19"), tt.build());
    tabbedPane.addTab(Messages.getString("LooksFrame.20"), gt.build());
    tabbedPane.addTab(Messages.getString("LooksFrame.22"), nt.build());
    if (!configuration.isDisableTranscoding()) {
        tabbedPane.addTab(Messages.getString("LooksFrame.21"), tr.build());
    } else {//www  . ja v  a 2s  .c  o  m
        tr.build();
    }
    tabbedPane.addTab(Messages.getString("LooksFrame.24"), new HelpTab().build());
    tabbedPane.addTab(Messages.getString("LooksFrame.25"), new AboutTab().build());

    tabbedPane.addChangeListener(new ChangeListener() {
        @Override
        public void stateChanged(ChangeEvent e) {
            int selectedIndex = tabbedPane.getSelectedIndex();

            if (HELP_PAGES[selectedIndex] != null) {
                PMS.setHelpPage(HELP_PAGES[selectedIndex]);

                // Update the contents of the help tab itself
                ht.updateContents();
            }
        }
    });

    tabbedPane.setBorder(new EmptyBorder(5, 5, 5, 5));

    /*
     * Set the orientation of the tabbedPane.
     * Note: Do not use applyComponentOrientation() here because it
     * messes with the layout of several tabs.
     */
    ComponentOrientation orientation = ComponentOrientation.getOrientation(PMS.getLocale());
    tabbedPane.setComponentOrientation(orientation);

    return tabbedPane;
}

From source file:greenfoot.gui.export.ExportPublishPane.java

/**
 * Creates the scenario information display including information such as title, description, url.
 * For an update (isUpdate = true), the displayed options are slightly different.
 *///from   ww  w . j ava 2 s.c o  m
private void createScenarioDisplay() {
    leftPanel = new Box(BoxLayout.Y_AXIS);
    JLabel text;
    MiksGridLayout titleAndDescLayout = new MiksGridLayout(6, 2, 8, 8);
    titleAndDescLayout.setVerticallyExpandingRow(3);

    titleAndDescPanel = new JPanel(titleAndDescLayout);
    titleAndDescPanel.setBackground(background);

    if (imagePanel == null) {
        imagePanel = new ImageEditPanel(IMAGE_WIDTH, IMAGE_HEIGHT);
        imagePanel.setBackground(background);
    }

    Box textPanel = new Box(BoxLayout.Y_AXIS);
    {
        text = new JLabel(Config.getString("export.publish.image1"));
        text.setAlignmentX(Component.RIGHT_ALIGNMENT);
        text.setFont(font);
        textPanel.add(text);
        text = new JLabel(Config.getString("export.publish.image2"));
        text.setAlignmentX(Component.RIGHT_ALIGNMENT);
        text.setFont(font);
        textPanel.add(text);
    }
    titleAndDescPanel.add(textPanel);
    titleAndDescPanel.add(imagePanel);

    if (isUpdate) {
        text = new JLabel(Config.getString("export.snapshot.label"), SwingConstants.TRAILING);
        text.setFont(font);
        titleAndDescPanel.add(text);

        keepScenarioScreenshot = new JCheckBox();
        keepScenarioScreenshot.setSelected(true);
        // "keep screenshot" defaults to true, therefore the image panel should be disabled
        imagePanel.enableImageEditPanel(false);
        keepScenarioScreenshot.setName(Config.getString("export.publish.keepScenario"));
        keepScenarioScreenshot.setOpaque(false);
        keepScenarioScreenshot.addChangeListener(this);
        titleAndDescPanel.add(keepScenarioScreenshot);
    }

    text = new JLabel(Config.getString("export.publish.title"), SwingConstants.TRAILING);
    text.setFont(font);
    titleAndDescPanel.add(text);

    String title = project.getName();
    if (getTitle() != null) {
        title = getTitle();
    }
    titleField = new JTextField(title);
    titleField.setInputVerifier(new InputVerifier() {
        @Override
        public boolean verify(JComponent input) {
            String text = titleField.getText();
            return text.length() > 0;
        }
    });
    titleField.addFocusListener(new FocusAdapter() {
        @Override
        public void focusLost(FocusEvent e) {
            checkForExistingScenario();
        }
    });
    titleAndDescPanel.add(titleField);

    // If there is an update a "changes" description area is shown.
    // If not there a short description and long description area are shown.
    if (isUpdate) {
        JLabel updateLabel = new JLabel(Config.getString("export.publish.update"), SwingConstants.TRAILING);
        updateLabel.setVerticalAlignment(SwingConstants.TOP);
        updateLabel.setFont(font);

        updateArea = new JTextArea();
        updateArea.setRows(6);
        updateArea.setLineWrap(true);
        updateArea.setWrapStyleWord(true);
        JScrollPane updatePane = new JScrollPane(updateArea);

        titleAndDescPanel.add(updateLabel);
        titleAndDescPanel.add(updatePane);
        titleAndDescLayout.setVerticallyExpandingRow(4);
    } else {
        text = new JLabel(Config.getString("export.publish.shortDescription"), SwingConstants.TRAILING);
        text.setFont(font);
        shortDescriptionField = new JTextField();
        titleAndDescPanel.add(text);
        titleAndDescPanel.add(shortDescriptionField);
        text = new JLabel(Config.getString("export.publish.longDescription"), SwingConstants.TRAILING);
        text.setVerticalAlignment(SwingConstants.TOP);
        text.setFont(font);

        descriptionArea = new JTextArea();
        descriptionArea.setRows(6);
        descriptionArea.setLineWrap(true);
        descriptionArea.setWrapStyleWord(true);
        JScrollPane description = new JScrollPane(descriptionArea);
        titleAndDescPanel.add(text);
        titleAndDescPanel.add(description);
    }

    text = new JLabel(Config.getString("export.publish.url"), SwingConstants.TRAILING);
    text.setFont(font);
    titleAndDescPanel.add(text);

    urlField = new JTextField();
    titleAndDescPanel.add(urlField);

    leftPanel.add(titleAndDescPanel, BorderLayout.SOUTH);

    JComponent sourceAndLockPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 8, 0));
    {
        sourceAndLockPanel.setBackground(background);
        includeSource = new JCheckBox(Config.getString("export.publish.includeSource"));
        includeSource.setOpaque(false);
        includeSource.setSelected(false);
        includeSource.setFont(font);
        sourceAndLockPanel.add(includeSource);
        lockScenario.setFont(font);
        sourceAndLockPanel.add(lockScenario);
        sourceAndLockPanel.setMaximumSize(sourceAndLockPanel.getPreferredSize());
    }

    leftPanel.add(sourceAndLockPanel, BorderLayout.SOUTH);
}

From source file:edu.ku.brc.specify.config.init.SpecifyDBSetupWizard.java

/**
 * @param wizardType/*from  www .  j a  v  a 2s . c  o m*/
 * @param listener
 */
public SpecifyDBSetupWizard(final WizardType wizardType, final WizardListener listener) {
    super();

    this.wizardType = wizardType;
    this.listener = listener;

    System.setProperty(DBMSUserMgr.factoryName, "edu.ku.brc.dbsupport.MySQLDMBSUserMgr");

    /*setupXMLPath = UIRegistry.getUserHomeAppDir() + File.separator + "setup_prefs.xml";
    try
    {
    props.loadFromXML(new FileInputStream(new File(setupXMLPath)));
            
    } catch (Exception ex)
    {
    edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount();
    edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(SpecifyDBSetupWizard.class, ex);
    }*/

    HelpMgr.setLoadingPage("Load");

    cardPanel = new JPanel(cardLayout);

    cancelBtn = createButton(UIRegistry.getResourceString("CANCEL"));
    helpBtn = createButton(UIRegistry.getResourceString("HELP"));

    JPanel btnBar;
    backBtn = createButton(UIRegistry.getResourceString("BACK"));
    nextBtn = createButton(UIRegistry.getResourceString("NEXT"));

    CellConstraints cc = new CellConstraints();
    PanelBuilder bbpb = new PanelBuilder(new FormLayout("f:p:g,p,4px,p,4px,p,4px,p,4px", "p"));

    bbpb.add(helpBtn, cc.xy(2, 1));
    bbpb.add(backBtn, cc.xy(4, 1));
    bbpb.add(nextBtn, cc.xy(6, 1));
    bbpb.add(cancelBtn, cc.xy(8, 1));

    btnBar = bbpb.getPanel();

    boolean doTesting = AppPreferences.getLocalPrefs().getBoolean("wizard.defaults", false);
    if (doTesting && wizardType == WizardType.Institution) {
        props.put("hostName", "localhost");
        props.put("dbName", "testfish");
        props.put("dbUserName", "Specify");
        props.put("dbPassword", "Specify");

        props.put("saUserName", "Master");
        props.put("saPassword", "Master");

        props.put("firstName", "Test");
        props.put("lastName", "User");
        props.put("middleInitial", "a");
        props.put("email", "tester@ku.edu");
        props.put("usrUsername", "testuser");
        props.put("usrPassword", "testuser");

        props.put("instName", "KU natural History Museum");
        props.put("instAbbrev", "KU-NHM");

        props.put("divName", "Fish");
        props.put("divAbbrev", "IT");

        props.put("collName", "Fish");
        props.put("collPrefix", "KUFSH");

        // Address
        props.put("addr1", "1345 Jayhawk Blvd");
        props.put("addr2", "606 Dyche Hall");
        props.put("city", "Lawrence");
        props.put("state", "KS");
        props.put("country", "USA");
        props.put("zip", "66044");
        props.put("phone", "785-864-5555");

        props.put("addtaxon", true);
    } else {
        props.put("hostName", "localhost");
        props.put("dbName", "specify");
    }

    props.put("userType", SpecifyUserTypes.UserType.Manager.toString());

    UIFieldFormatterMgr.setDoingLocal(true);

    String accessionFmt = null;

    if (wizardType == WizardType.Institution) {
        props.put("fromwizard", "true");

        dbPanel = new DatabasePanel(nextBtn, backBtn, getHelpCntxt("wizard_mysql_username"), true);
        panels.add(dbPanel);
        HelpMgr.registerComponent(helpBtn, dbPanel.getHelpContext());
        if (listener != null) {
            listener.helpContextChanged(dbPanel.getHelpContext());
        }
        panels.add(new MasterUserPanel("SA", "ENTER_SA_INFO", getHelpCntxt("wizard_master_username"),
                new String[] { "SA_USERNAME", "SA_PASSWORD" }, new String[] { "saUserName", "saPassword" },
                new Integer[] { 32, 32 }, nextBtn, backBtn, true));

        panels.add(new GenericFormPanel("SECURITY", "SECURITY_INFO", getHelpCntxt("wizard_security_on"),
                new String[] { "SECURITY_ON" }, new String[] { "security_on" }, new String[] { "checkbox" },
                nextBtn, backBtn, true));

        userInfoPanel = new UserInfoPanel("AGENT", "ENTER_COLMGR_INFO", getHelpCntxt("wizard_create_it_user"),
                new String[] { "FIRSTNAME", "LASTNAME", "MIDNAME", "EMAIL", null, "USERLOGININFO", "USERNAME",
                        "PASSWORD" },
                new String[] { "firstName", "lastName", "middleInitial", "email", " ", "-", "usrUsername",
                        "usrPassword" },
                new boolean[] { true, true, false, true, true, false, true, true },
                new Integer[] { 50, 120, 50, 50, null, null, 64, 32 }, nextBtn, backBtn);
        panels.add(userInfoPanel);

        panels.add(new GenericFormPanel("INST", "ENTER_INST_INFO", getHelpCntxt("wizard_create_institution"),
                new String[] { "NAME", "ABBREV", null, "INST_ADDR", "ADDR1", "ADDR2", "CITY", "STATE",
                        "COUNTRY", "ZIP", "PHONE" },
                new String[] { "instName", "instAbbrev", " ", "-", "addr1", "addr2", "city", "state", "country",
                        "zip", "phone" },
                new boolean[] { true, true, false, false, true, false, true, true, true, true, true },
                new Integer[] { 255, 32, 50, null, 255, 255, 64, 64, 64, 32, 50 }, nextBtn, backBtn, true));

        accessionPanel = new GenericFormPanel("ACCESSIONGLOBALLY", "ENTER_ACC_INFO",
                getHelpCntxt("wizard_choose_accession_level"), new String[] { "ACCGLOBALLY" },
                new String[] { "accglobal" }, new String[] { "checkbox" }, nextBtn, backBtn, true);
        panels.add(accessionPanel);

        if (wizardType == WizardType.Institution) {
            accessionPickerGbl = new FormatterPickerPanel("ACCNOFMT",
                    getHelpCntxt("wizard_create_accession_number"), nextBtn, backBtn, false, null);
            panels.add(accessionPickerGbl);

        }

        storageTDPanel = new TreeDefSetupPanel(StorageTreeDef.class, getResourceString("Storage"), "Storage",
                getHelpCntxt("wizard_configure_storage_tree"), "CONFIG_TREEDEF", nextBtn, backBtn, null);
        panels.add(storageTDPanel);

        panels.add(new InstSetupPanel("CREATEINST", "CREATEINST", getHelpCntxt("wizard_create_institution"),
                new String[] {}, new String[] {}, new Integer[] {}, nextBtn, backBtn, true));
    }

    if (wizardType == WizardType.Institution || wizardType == WizardType.Division) {
        DivisionPanel divPanel = new DivisionPanel("DIV", "ENTER_DIV_INFO",
                getHelpCntxt("wizard_enter_division"), new String[] { "NAME", "ABBREV" },
                new String[] { "divName", "divAbbrev" }, new Integer[] { 255, 64 }, nextBtn, backBtn, true);
        panels.add(divPanel);

        if (wizardType == WizardType.Division) {
            HelpMgr.registerComponent(helpBtn, divPanel.getHelpContext());
        }
    }

    if (wizardType != WizardType.Institution) {
        Institution institution = AppContextMgr.getInstance().getClassObject(Institution.class);
        Division division = AppContextMgr.getInstance().getClassObject(Division.class);
        if (!institution.getIsAccessionsGlobal()) {
            String sql = "SELECT ans.FormatName FROM autonumberingscheme ans  Inner Join autonumsch_div ad ON ans.AutoNumberingSchemeID = ad.AutoNumberingSchemeID "
                    + "INNER JOIN division d ON ad.DivisionID = d.UserGroupScopeId WHERE d.DivisionID = "
                    + division.getId();
            log.debug(sql);
            Vector<Object> rows = BasicSQLUtils.querySingleCol(sql);
            if (rows.size() == 1) {
                accessionFmt = rows.get(0).toString();
            } else {
                log.error("The return " + rows.size());
            }
        }
    }

    if (wizardType == WizardType.Institution || wizardType == WizardType.Division
            || wizardType == WizardType.Discipline) {
        nextBtn.setEnabled(false);
        disciplinePanel = new DisciplinePanel(getHelpCntxt("wizard_choose_discipline_type"), nextBtn, backBtn);
        panels.add(disciplinePanel);

        if (wizardType == WizardType.Discipline) {
            HelpMgr.registerComponent(helpBtn, disciplinePanel.getHelpContext());
        }

        taxonTDPanel = new TreeDefSetupPanel(TaxonTreeDef.class, getResourceString("Taxon"), "Taxon",
                getHelpCntxt("wizard_configure_taxon_tree"), "CONFIG_TREEDEF", nextBtn, backBtn,
                disciplinePanel);
        panels.add(taxonTDPanel);

        panels.add(new TaxonLoadSetupPanel(getHelpCntxt("wizard_preload_taxon"), nextBtn, backBtn));

        geoTDPanel = new TreeDefSetupPanel(GeographyTreeDef.class, getResourceString("Geography"), "Geography",
                getHelpCntxt("wizard_configure_geography_tree"), "CONFIG_TREEDEF", nextBtn, backBtn,
                disciplinePanel);
        panels.add(geoTDPanel);
    }

    CollectionPanel colPanel = new CollectionPanel("COLLECTION", "ENTER_COL_INFO",
            getHelpCntxt("wizard_create_collection"), new String[] { "NAME", "PREFIX", },
            new String[] { "collName", "collPrefix", }, new Integer[] { 50, 50 }, nextBtn, backBtn, true);
    panels.add(colPanel);

    if (wizardType == WizardType.Collection) {
        HelpMgr.registerComponent(helpBtn, colPanel.getHelpContext());
    }

    catNumPicker = new FormatterPickerPanel("CATNOFMT", getHelpCntxt("wizard_create_catalog_number"), nextBtn,
            backBtn, true, null);
    panels.add(catNumPicker);

    if (wizardType != WizardType.Institution) {
        Division division = AppContextMgr.getInstance().getClassObject(Division.class);
        String sql = "SELECT COUNT(*) FROM division d INNER JOIN collection c ON d.UserGroupScopeId = c.DisciplineID WHERE d.UserGroupScopeId = "
                + division.getId();
        log.debug(sql);
        int numCollectionsByDiv = BasicSQLUtils.getCountAsInt(sql);

        if (numCollectionsByDiv == 0) {
            Institution inst = AppContextMgr.getInstance().getClassObject(Institution.class);
            if (inst != null && !inst.getIsAccessionsGlobal()) {
                //if (wizardType != WizardType.Division)
                {
                    accessionPickerCol = new FormatterPickerPanel("ACCNOFMT",
                            getHelpCntxt("wizard_create_accession_number"), nextBtn, backBtn, false,
                            accessionFmt);
                    accessionPickerCol.setDoingDisciplineCollection(wizardType != WizardType.Division);
                    panels.add(accessionPickerCol);
                }
            }
        }
    } else {
        accessionPickerCol = new FormatterPickerPanel("ACCNOFMT",
                getHelpCntxt("wizard_create_accession_number"), nextBtn, backBtn, false, null);
        panels.add(accessionPickerCol);
    }

    panels.add(new SummaryPanel("SUMMARY", getHelpCntxt("wizard_summary"), nextBtn, backBtn, panels));

    lastStep = panels.size();

    if (backBtn != null) {
        backBtn.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                if (step > 0) {
                    if (disciplinePanel != null) {
                        DisciplineType disciplineType = disciplinePanel.getDisciplineType();
                        if (disciplineType != null && disciplineType.isPaleo()
                                && panels.get(step - 1) instanceof TaxonLoadSetupPanel) {
                            //step--;
                        }
                    }

                    if (panels.get(step - 1) == accessionPickerGbl) {
                        if (!((Boolean) props.get("accglobal"))) {
                            step--;
                        }
                    }

                    if (panels.get(step - 1) == accessionPickerCol) {
                        boolean isAccGlobal;
                        if (accessionPanel != null) {
                            accessionPanel.getValues(props);
                            isAccGlobal = (Boolean) props.get("accglobal");
                        } else {
                            Institution inst = AppContextMgr.getInstance().getClassObject(Institution.class);
                            isAccGlobal = inst != null && !inst.getIsAccessionsGlobal();
                        }
                        if (isAccGlobal) {
                            step--;
                        }
                    }

                    step--;
                    panels.get(step).doingPrev();
                    HelpMgr.registerComponent(helpBtn, panels.get(step).getHelpContext());
                    cardLayout.show(cardPanel, Integer.toString(step));
                }
                updateBtnBar();
                if (listener != null) {
                    listener.panelChanged(getResourceString(panels.get(step).getPanelName() + ".TITLE"));
                    listener.helpContextChanged(panels.get(step).getHelpContext());
                }
            }
        });

        backBtn.setEnabled(false);
    }

    nextBtn.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (step == lastStep - 2) {
                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        Component c = SpecifyDBSetupWizard.this.getParent();
                        while (!(c instanceof Window) && c != null) {
                            c = c.getParent();
                        }
                        if (c != null) {
                            ((Window) c).pack();
                        }
                    }
                });
            }

            if (step < lastStep - 1) {
                DisciplineType disciplineType = null;
                if (disciplinePanel == null) {
                    Discipline discipline = AppContextMgr.getInstance().getClassObject(Discipline.class);
                    disciplineType = DisciplineType.getByName(discipline.getType());

                } else {
                    disciplineType = disciplinePanel.getDisciplineType();
                }

                panels.get(step).getValues(props);
                panels.get(step).aboutToLeave();

                if (step == 1) {
                    String isCnvUploadVal = props.getProperty(DatabasePanel.DB_STRUCT_ONLY);
                    boolean isCnvUpload = StringUtils.isNotEmpty(isCnvUploadVal) ? isCnvUploadVal.equals("true")
                            : false;
                    if (isCnvUpload) {
                        setupLoginPrefs();

                        JOptionPane.showMessageDialog(UIRegistry.getTopWindow(),
                                getResourceString("CONVUPLD_DONE"), getResourceString("COMPLETE"),
                                JOptionPane.INFORMATION_MESSAGE);
                        SpecifyDBSetupWizard.this.listener.finished();
                        return;
                    }
                }

                if (disciplineType != null && disciplineType.isPaleo()
                        && panels.get(step) instanceof TreeDefSetupPanel
                        && ((TreeDefSetupPanel) panels.get(step)).getClassType() == TaxonTreeDef.class) {
                    //step++;
                }

                if (panels.get(step) == accessionPanel) {
                    accessionPanel.getValues(props);
                    if (!((Boolean) props.get("accglobal"))) {
                        step++;
                    }
                }

                if (panels.get(step) == catNumPicker) {

                    if (accessionPanel != null) {
                        accessionPanel.getValues(props);
                        boolean isAccGlobal = (Boolean) props.get("accglobal");
                        if (isAccGlobal) {
                            step++;
                        }
                    }
                }

                advanceToNextPanel();

            } else {
                nextBtn.setEnabled(false);

                if (wizardType == WizardType.Institution) {
                    configSetup();

                    configureDatabase();
                } else {
                    //SpecifyDBSetupWizard.this.listener.hide();
                    SpecifyDBSetupWizard.this.listener.finished();
                }
            }
        }
    });

    cancelBtn.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            if (SpecifyDBSetupWizard.this.listener != null) {
                if (step == lastStep) {
                    SpecifyDBSetupWizard.this.listener.finished();
                } else {
                    if (UIHelper.promptForAction("QUIT", "NO", "CANCEL", getResourceString("SURE_QUIT"))) {
                        SpecifyDBSetupWizard.this.listener.cancelled();
                    }
                }
            }
        }
    });

    for (int i = 0; i < panels.size(); i++) {
        cardPanel.add(Integer.toString(i), panels.get(i));
        panels.get(i).setValues(props);
    }
    cardLayout.show(cardPanel, "0");

    if (dbPanel != null) {
        dbPanel.updateBtnUI();
    }

    PanelBuilder builder = new PanelBuilder(new FormLayout("f:p:g", "f:p:g,10px,p"));
    builder.add(cardPanel, cc.xy(1, 1));
    builder.add(btnBar, cc.xy(1, 3));

    builder.setDefaultDialogBorder();

    setLayout(new BorderLayout());
    PanelBuilder iconBldr = new PanelBuilder(new FormLayout("20px, f:p:g,p,f:p:g,8px", "20px,t:p,f:p:g, 8px"));
    JLabel iconLbl = new JLabel(IconManager.getIcon(getIconName()));
    iconLbl.setVerticalAlignment(SwingConstants.TOP);
    iconBldr.add(iconLbl, cc.xy(2, 3));
    add(iconBldr.getPanel(), BorderLayout.WEST);
    add(builder.getPanel(), BorderLayout.CENTER);

    progressBar = new JProgressBar(0, lastStep - 1);
    progressBar.setStringPainted(true);
    add(progressBar, BorderLayout.SOUTH);

    panels.get(0).updateBtnUI();

}

From source file:ucar.unidata.idv.flythrough.Flythrough.java

/**
 * _more_//  w  w  w .ja v  a2 s  .  c  o  m
 *
 * @return _more_
 */
public JComponent doMakeValuesPanel() {
    readoutLabel = GuiUtils.getFixedWidthLabel("<html></html>");
    readoutLabel.setVerticalAlignment(SwingConstants.TOP);

    readoutDisplay = new JPanel();
    readoutDisplay.setLayout(new BorderLayout());
    return readoutLabel;
}

From source file:eu.crisis_economics.abm.dashboard.Page_Parameters.java

@SuppressWarnings("serial")
private JPanel createParamsweepGUI() {

    // left/*from w w  w  .j ava2  s.  co m*/
    parameterList = new JList();
    parameterList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    new ListAction(parameterList, new AbstractAction() {
        public void actionPerformed(final ActionEvent event) {
            final AvailableParameter selectedParameter = (AvailableParameter) parameterList.getSelectedValue();
            addParameterToTree(new AvailableParameter[] { selectedParameter }, parameterTreeBranches.get(0));
            enableDisableParameterCombinationButtons();
        }
    });
    parameterList.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
            if (!parameterList.isSelectionEmpty()) {
                boolean success = true;
                if (editedNode != null)
                    success = modify();

                if (success) {
                    cancelAllSelectionBut(parameterList);
                    resetSettings();
                    updateDescriptionField(parameterList.getSelectedValues());
                    enableDisableParameterCombinationButtons();
                } else
                    parameterList.clearSelection();
            }
        }
    });

    final JScrollPane parameterListPane = new JScrollPane(parameterList);
    parameterListPane.setBorder(BorderFactory.createTitledBorder("")); // for rounded border
    parameterListPane.setPreferredSize(new Dimension(300, 300));

    final JPanel parametersPanel = FormsUtils.build("p ' p:g", "[DialogBorder]00||" + "12||" + "34||" +
    //                                          "56||" + 
            "55||" + "66 f:p:g", new FormsUtils.Separator("<html><b>General parameters</b></html>"),
            NUMBER_OF_TURNS_LABEL_TEXT, numberOfTurnsFieldPSW, NUMBER_OF_TIMESTEPS_TO_IGNORE_LABEL_TEXT,
            numberTimestepsIgnoredPSW,
            //                                          UPDATE_CHARTS_LABEL_TEXT,onLineChartsCheckBoxPSW,
            new FormsUtils.Separator("<html><b>Model parameters</b></html>"), parameterListPane).getPanel();

    combinationsPanel = new JPanel(new GridLayout(0, 1, 5, 5));
    combinationsScrPane = new JScrollPane(combinationsPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    combinationsScrPane.setBorder(null);
    combinationsScrPane.setPreferredSize(new Dimension(550, 500));

    parameterDescriptionLabel = new JXLabel();
    parameterDescriptionLabel.setLineWrap(true);
    parameterDescriptionLabel.setVerticalAlignment(SwingConstants.TOP);
    final JScrollPane descriptionScrollPane = new JScrollPane(parameterDescriptionLabel);
    descriptionScrollPane.setBorder(BorderFactory.createTitledBorder(null, "Description", TitledBorder.LEADING,
            TitledBorder.BELOW_TOP));
    descriptionScrollPane.setPreferredSize(
            new Dimension(PARAMETER_DESCRIPTION_LABEL_WIDTH, PARAMETER_DESCRIPTION_LABEL_HEIGHT));
    descriptionScrollPane.setViewportBorder(null);

    final JButton addNewBoxButton = new JButton("Add new combination");
    addNewBoxButton.setActionCommand(ACTIONCOMMAND_ADD_BOX);

    final JPanel left = FormsUtils.build("p ~ f:p:g ~ p", "011 f:p:g ||" + "0_2 p", parametersPanel,
            combinationsScrPane, addNewBoxButton).getPanel();
    left.setBorder(BorderFactory.createTitledBorder(null, "Specify parameter combinations",
            TitledBorder.LEADING, TitledBorder.BELOW_TOP));
    Style.registerCssClasses(left, Dashboard.CSS_CLASS_COMMON_PANEL);

    final JPanel leftAndDesc = new JPanel(new BorderLayout());
    leftAndDesc.add(left, BorderLayout.CENTER);
    leftAndDesc.add(descriptionScrollPane, BorderLayout.SOUTH);
    Style.registerCssClasses(leftAndDesc, Dashboard.CSS_CLASS_COMMON_PANEL);

    // right
    editedParameterText = new JLabel(ORIGINAL_TEXT);
    editedParameterText.setPreferredSize(new Dimension(280, 40));
    constDef = new JRadioButton("Constant");
    listDef = new JRadioButton("List");
    incrDef = new JRadioButton("Increment");

    final JPanel rightTop = FormsUtils.build("p:g", "[DialogBorder]0||" + "1||" + "2||" + "3",
            editedParameterText, constDef, listDef, incrDef).getPanel();

    Style.registerCssClasses(rightTop, Dashboard.CSS_CLASS_COMMON_PANEL);

    constDefField = new JTextField();
    final JPanel constDefPanel = FormsUtils
            .build("p ~ p:g", "[DialogBorder]01 p", "Constant value: ", CellConstraints.TOP, constDefField)
            .getPanel();

    listDefArea = new JTextArea();
    final JScrollPane listDefScr = new JScrollPane(listDefArea,
            ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    final JPanel listDefPanel = FormsUtils.build("p ~ p:g", "[DialogBorder]01|" + "_1 f:p:g||" + "_2 p",
            "Value list: ", listDefScr, "(Separate values with spaces!)").getPanel();

    incrStartValueField = new JTextField();
    incrEndValueField = new JTextField();
    incrStepField = new JTextField();

    final JPanel incrDefPanel = FormsUtils.build("p ~ p:g", "[DialogBorder]01||" + "23||" + "45",
            "Start value: ", incrStartValueField, "End value: ", incrEndValueField, "Step: ", incrStepField)
            .getPanel();

    enumDefBox = new JComboBox(new DefaultComboBoxModel());
    final JPanel enumDefPanel = FormsUtils
            .build("p ~ p:g", "[DialogBorder]01 p", "Constant value:", CellConstraints.TOP, enumDefBox)
            .getPanel();

    submodelTypeBox = new JComboBox();
    final JPanel submodelTypePanel = FormsUtils
            .build("p ~ p:g", "[DialogBorder]01", "Constant value:", CellConstraints.TOP, submodelTypeBox)
            .getPanel();

    fileTextField = new JTextField();
    fileTextField.addKeyListener(new KeyAdapter() {
        public void keyTyped(final KeyEvent e) {
            final char character = e.getKeyChar();
            final File file = new File(Character.isISOControl(character) ? fileTextField.getText()
                    : fileTextField.getText() + character);
            fileTextField.setToolTipText(file.getAbsolutePath());
        }
    });
    fileBrowseButton = new JButton(BROWSE_BUTTON_TEXT);
    fileBrowseButton.setActionCommand(ACTIONCOMMAND_BROWSE);
    final JPanel fileDefPanel = FormsUtils
            .build("p ~ p:g ~p", "[DialogBorder]012", "File:", fileTextField, fileBrowseButton).getPanel();

    constDefPanel.setName("CONST");
    listDefPanel.setName("LIST");
    incrDefPanel.setName("INCREMENT");
    enumDefPanel.setName("ENUM");
    submodelTypePanel.setName("SUBMODEL");
    fileDefPanel.setName("FILE");

    Style.registerCssClasses(constDefPanel, Dashboard.CSS_CLASS_COMMON_PANEL);
    Style.registerCssClasses(listDefPanel, Dashboard.CSS_CLASS_COMMON_PANEL);
    Style.registerCssClasses(incrDefPanel, Dashboard.CSS_CLASS_COMMON_PANEL);
    Style.registerCssClasses(enumDefPanel, Dashboard.CSS_CLASS_COMMON_PANEL);
    Style.registerCssClasses(submodelTypePanel, Dashboard.CSS_CLASS_COMMON_PANEL);
    Style.registerCssClasses(fileDefPanel, Dashboard.CSS_CLASS_COMMON_PANEL);

    rightMiddle = new JPanel(new CardLayout());
    Style.registerCssClasses(rightMiddle, Dashboard.CSS_CLASS_COMMON_PANEL);
    rightMiddle.add(constDefPanel, constDefPanel.getName());
    rightMiddle.add(listDefPanel, listDefPanel.getName());
    rightMiddle.add(incrDefPanel, incrDefPanel.getName());
    rightMiddle.add(enumDefPanel, enumDefPanel.getName());
    rightMiddle.add(submodelTypePanel, submodelTypePanel.getName());
    rightMiddle.add(fileDefPanel, fileDefPanel.getName());

    modifyButton = new JButton("Modify");
    cancelButton = new JButton("Cancel");

    final JPanel rightBottom = FormsUtils
            .build("p:g p ~ p ~ p:g", "[DialogBorder]_01_ p", modifyButton, cancelButton).getPanel();

    Style.registerCssClasses(rightBottom, Dashboard.CSS_CLASS_COMMON_PANEL);

    final JPanel right = new JPanel(new BorderLayout());
    right.add(rightTop, BorderLayout.NORTH);
    right.add(rightMiddle, BorderLayout.CENTER);
    right.add(rightBottom, BorderLayout.SOUTH);
    right.setBorder(BorderFactory.createTitledBorder(null, "Parameter settings", TitledBorder.LEADING,
            TitledBorder.BELOW_TOP));

    Style.registerCssClasses(right, Dashboard.CSS_CLASS_COMMON_PANEL);

    // the whole paramsweep panel

    final JPanel content = FormsUtils.build("p:g p", "01 f:p:g", leftAndDesc, right).getPanel();
    Style.registerCssClasses(content, Dashboard.CSS_CLASS_COMMON_PANEL);

    sweepPanel = new JPanel();
    Style.registerCssClasses(sweepPanel, Dashboard.CSS_CLASS_COMMON_PANEL);
    sweepPanel.setLayout(new BorderLayout());
    final JScrollPane sp = new JScrollPane(content);
    sp.setBorder(null);
    sp.setViewportBorder(null);
    sweepPanel.add(sp, BorderLayout.CENTER);

    GUIUtils.createButtonGroup(constDef, listDef, incrDef);
    constDef.setSelected(true);
    constDef.setActionCommand("CONST");
    listDef.setActionCommand("LIST");
    incrDef.setActionCommand("INCREMENT");

    constDefField.setActionCommand("CONST_FIELD");
    incrStartValueField.setActionCommand("START_FIELD");
    incrEndValueField.setActionCommand("END_FIELD");
    incrStepField.setActionCommand("STEP_FIELD");

    modifyButton.setActionCommand("EDIT");
    cancelButton.setActionCommand("CANCEL");

    listDefArea.setLineWrap(true);
    listDefArea.setWrapStyleWord(true);
    listDefScr.setPreferredSize(new Dimension(100, 200));

    GUIUtils.addActionListener(this, modifyButton, cancelButton, constDef, listDef, incrDef, constDefField,
            incrStartValueField, incrEndValueField, incrStepField, addNewBoxButton, submodelTypeBox,
            fileBrowseButton);

    return sweepPanel;
}

From source file:v800_trainer.JCicloTronic.java

/** This method is called from within the constructor to
 * initialize the form.//from  ww  w  .ja  va2 s.  co  m
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the FormEditor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    buttonGroup_Karte = new javax.swing.ButtonGroup();
    Hauptfenster = new javax.swing.JTabbedPane();
    Datenliste_Panel = new javax.swing.JPanel();
    Datenliste_scroll_Panel = new javax.swing.JScrollPane();
    Datentabelle = new javax.swing.JTable();
    Datenliste_Jahr = new javax.swing.JComboBox();
    Datenliste_Monat = new javax.swing.JComboBox();
    jLabel11 = new javax.swing.JLabel();
    jLabel51 = new javax.swing.JLabel();
    Datenliste_Zeitabschnitt = new javax.swing.JComboBox();
    jLabel65 = new javax.swing.JLabel();
    jLabel66 = new javax.swing.JLabel();
    Datenliste_TourTyp = new javax.swing.JComboBox();
    jLabel68 = new javax.swing.JLabel();
    jLabel69_Selektiert = new javax.swing.JLabel();
    Datenliste_search = new javax.swing.JTextField();
    Datenliste_searchButton = new javax.swing.JButton();
    jLabel_search = new javax.swing.JLabel();
    Info_Panel = new javax.swing.JPanel();
    Auswahl_Info = new javax.swing.JComboBox();
    Info_Titel = new javax.swing.JTextField();
    Info_Vorname = new javax.swing.JTextField();
    Info_Name = new javax.swing.JTextField();
    Info_GebTag = new javax.swing.JTextField();
    Info_Gewicht = new javax.swing.JTextField();
    Info_Verein = new javax.swing.JTextField();
    Info_Material = new javax.swing.JTextField();
    Info_Materialgewicht = new javax.swing.JTextField();
    Info_Startort = new javax.swing.JTextField();
    Info_Zielort = new javax.swing.JTextField();
    jLabel24Uhrzeit = new javax.swing.JLabel();
    jLabel24 = new javax.swing.JLabel();
    jLabel52 = new javax.swing.JLabel();
    jLabel53 = new javax.swing.JLabel();
    jLabel54 = new javax.swing.JLabel();
    jLabel55 = new javax.swing.JLabel();
    jLabel56 = new javax.swing.JLabel();
    jLabel57 = new javax.swing.JLabel();
    jLabel58 = new javax.swing.JLabel();
    jLabel59 = new javax.swing.JLabel();
    jLabel60 = new javax.swing.JLabel();
    jLabel61 = new javax.swing.JLabel();
    Info_Button_kopieren = new javax.swing.JButton();
    Info_Button_einfgen = new javax.swing.JButton();
    jScrollPane2 = new javax.swing.JScrollPane();
    Info_Notiz = new javax.swing.JTextArea();
    Info_Button_speichern = new javax.swing.JButton();
    jLabel63 = new javax.swing.JLabel();
    jLabel64 = new javax.swing.JLabel();
    jLabel65Typ = new javax.swing.JLabel();
    jLabel69 = new javax.swing.JLabel();
    Info_Button_Suche_TrackLog = new javax.swing.JButton();
    Info_Track_Log = new javax.swing.JTextField();
    Statistik_Panel = new javax.swing.JPanel();
    Auswahl_Statistik = new javax.swing.JComboBox();
    jPanel2 = new javax.swing.JPanel();
    Statistik_Hhe = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    Statistik_Minimale_Hhe = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    Statistik_Maximale_Hhe = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    Statistik_Summe_Hm_Steigung = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    Statistik_Summe_Hm_Geflle = new javax.swing.JLabel();
    jLabel17 = new javax.swing.JLabel();
    Statistik_HM_pro_km = new javax.swing.JLabel();
    Statistik_Geschwindigkeit = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    Statistik_Max_Geschw = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    Statistik_av_Geschw = new javax.swing.JLabel();
    Statistik_Herzfrequenz = new javax.swing.JPanel();
    jLabel7 = new javax.swing.JLabel();
    Statistik_max_HF = new javax.swing.JLabel();
    jLabel8 = new javax.swing.JLabel();
    Statistik_av_HF = new javax.swing.JLabel();
    Statistik_Steigung_m = new javax.swing.JPanel();
    jLabel9 = new javax.swing.JLabel();
    Statistik_max_Steigung_m = new javax.swing.JLabel();
    jLabel10 = new javax.swing.JLabel();
    Statistik_av_Steigung_m = new javax.swing.JLabel();
    Statistik_Geflle_m = new javax.swing.JPanel();
    jLabel12 = new javax.swing.JLabel();
    Statistik_max_Geflle_m = new javax.swing.JLabel();
    jLabel13 = new javax.swing.JLabel();
    Statistik_av_Geflle_m = new javax.swing.JLabel();
    Statistik_Temperatur = new javax.swing.JPanel();
    jLabel14 = new javax.swing.JLabel();
    Statistik_min_Temp = new javax.swing.JLabel();
    jLabel15 = new javax.swing.JLabel();
    Statistik_max_Temp = new javax.swing.JLabel();
    jLabel16 = new javax.swing.JLabel();
    Statistik_av_Temp = new javax.swing.JLabel();
    Statistik_Cadence = new javax.swing.JPanel();
    jLabel18 = new javax.swing.JLabel();
    Statistik_max_Cadence = new javax.swing.JLabel();
    jLabel19 = new javax.swing.JLabel();
    Statistik_av_Cadence = new javax.swing.JLabel();
    Statistik_Steigung_p = new javax.swing.JPanel();
    jLabel20 = new javax.swing.JLabel();
    Statistik_max_Steigung_p = new javax.swing.JLabel();
    jLabel21 = new javax.swing.JLabel();
    Statistik_av_Steigung_p = new javax.swing.JLabel();
    Statistik_Geflle_p = new javax.swing.JPanel();
    jLabel22 = new javax.swing.JLabel();
    Statistik_max_Geflle_p = new javax.swing.JLabel();
    jLabel23 = new javax.swing.JLabel();
    Statistik_av_Geflle_p = new javax.swing.JLabel();
    Statistik_Zeit = new javax.swing.JPanel();
    jLabel47 = new javax.swing.JLabel();
    Statistik_Zeit_absolut = new javax.swing.JLabel();
    jLabel48 = new javax.swing.JLabel();
    Statistik_Zeit_aktiv = new javax.swing.JLabel();
    jPanel5 = new javax.swing.JPanel();
    jLabel25 = new javax.swing.JLabel();
    Statistik_Teilstrecke = new javax.swing.JLabel();
    Statistik_Schrittlnge = new javax.swing.JPanel();
    jLabel26 = new javax.swing.JLabel();
    Statistik_max_Schrittlnge = new javax.swing.JLabel();
    jLabel28 = new javax.swing.JLabel();
    Statistik_av_Schrittlnge = new javax.swing.JLabel();
    Statistik_Training = new javax.swing.JPanel();
    jLabel29 = new javax.swing.JLabel();
    Statistik_Belastung = new javax.swing.JLabel();
    jLabel30 = new javax.swing.JLabel();
    Statistik_Erholungszeit = new javax.swing.JLabel();
    jLabel35 = new javax.swing.JLabel();
    Statistik_Lauf_Index = new javax.swing.JLabel();
    Statistik_Kalorien = new javax.swing.JPanel();
    jLabel31 = new javax.swing.JLabel();
    Statistik_Kalorien_absolut = new javax.swing.JLabel();
    jLabel34 = new javax.swing.JLabel();
    Statistik_Kalorien_h = new javax.swing.JLabel();
    jLabel32 = new javax.swing.JLabel();
    Statistik_Fett = new javax.swing.JLabel();
    jLabel33 = new javax.swing.JLabel();
    Statistik_Protein = new javax.swing.JLabel();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    Statistik_Titel = new javax.swing.JLabel();
    Graphik_Panel = new javax.swing.JPanel();
    Auswahl_Graphik = new javax.swing.JComboBox();
    Graphik_Sub_Panel = new javax.swing.JPanel();
    Graphik_check_Geschwindigkeit = new javax.swing.JCheckBox();
    Graphik_check_Hhe = new javax.swing.JCheckBox();
    Graphik_check_HF = new javax.swing.JCheckBox();
    Graphik_check_Temp = new javax.swing.JCheckBox();
    Graphik_check_Steigung_p = new javax.swing.JCheckBox();
    Graphik_check_Steigung_m = new javax.swing.JCheckBox();
    Graphik_check_Cadence = new javax.swing.JCheckBox();
    Graphik_Radio_Strecke = new javax.swing.JRadioButton();
    Graphik_Radio_Zeit = new javax.swing.JRadioButton();
    Graphik_check_Abstand = new javax.swing.JCheckBox();
    Graphik_check_av_Geschw = new javax.swing.JCheckBox();
    Graphik_check_Schrittlnge = new javax.swing.JCheckBox();
    Histogramm_Panel = new javax.swing.JPanel();
    Auswahl_Histogramm = new javax.swing.JComboBox();
    Summenhistogramm_Check = new javax.swing.JCheckBox();
    jPanel1 = new javax.swing.JPanel();
    jPanel18_HistoSP = new javax.swing.JPanel();
    jPanel17_HistoHM = new javax.swing.JPanel();
    jPanel16_HistoHF = new javax.swing.JPanel();
    jPanel19_HistoCd = new javax.swing.JPanel();
    jLabel26_Histotitel = new javax.swing.JLabel();
    Map_Panel = new javax.swing.JPanel();
    Auswahl_Map = new javax.swing.JComboBox();
    LoadGoogleEarth = new javax.swing.JButton();
    Kein_kmz_text = new javax.swing.JLabel();
    Map_internal_Panel = new javax.swing.JPanel();
    jLabel_map_streckenlnge = new javax.swing.JLabel();
    jLabel27 = new javax.swing.JLabel();
    Map_Type = new javax.swing.JComboBox<>();
    Jahresuebersicht_Panel = new javax.swing.JPanel();
    Auswahl_bersicht = new javax.swing.JComboBox();
    JahrVergleich = new javax.swing.JComboBox();
    jLabel67 = new javax.swing.JLabel();
    jLabel70 = new javax.swing.JLabel();
    jRadioButton_jahresverlauf = new javax.swing.JRadioButton();
    jRadioButton_monatsbersicht = new javax.swing.JRadioButton();
    jPanel17bersichtchart = new javax.swing.JPanel();
    jMenuHaupt = new javax.swing.JMenuBar();
    jMenuDatei = new javax.swing.JMenu();
    jMenuOpen = new javax.swing.JMenuItem();
    jMenuOpenall = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JSeparator();
    jMenuLschen = new javax.swing.JMenuItem();
    jMenuExit = new javax.swing.JMenuItem();
    jMenu_V800_Laden = new javax.swing.JMenu();
    jMenuTourEditor = new javax.swing.JMenu();
    jMenuEinstellungen = new javax.swing.JMenu();
    jMenuHilfe = new javax.swing.JMenu();

    setTitle("HWCyclingData");
    setPreferredSize(new java.awt.Dimension(800, 600));
    addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentResized(java.awt.event.ComponentEvent evt) {
            formComponentResized(evt);
        }
    });
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            exitForm(evt);
        }
    });
    java.awt.GridBagLayout layout = new java.awt.GridBagLayout();
    layout.columnWidths = new int[] { 0 };
    layout.rowHeights = new int[] { 0 };
    getContentPane().setLayout(layout);

    Hauptfenster.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Hauptfenster.setAlignmentX(0.0F);
    Hauptfenster.setAlignmentY(0.0F);
    Hauptfenster.setAutoscrolls(true);
    Hauptfenster.setPreferredSize(new java.awt.Dimension(10, 10));

    java.awt.GridBagLayout Datenliste_PanelLayout = new java.awt.GridBagLayout();
    Datenliste_PanelLayout.columnWidths = new int[] { 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0 };
    Datenliste_PanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0 };
    Datenliste_Panel.setLayout(Datenliste_PanelLayout);

    Datenliste_scroll_Panel.setAutoscrolls(true);

    Datentabelle.setAutoCreateColumnsFromModel(false);
    Datentabelle.setFont(Datentabelle.getFont());
    Datentabelle.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN);
    Datentabelle.setRowHeight(25);
    //ChangeModel();
    Datentabelle.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseDragged(java.awt.event.MouseEvent evt) {
            DatentabelleMouseDragged(evt);
        }
    });
    Datentabelle.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            DatentabelleMouseClicked(evt);
        }
    });
    Datenliste_scroll_Panel.setViewportView(Datentabelle);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 19;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.ipady = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Datenliste_Panel.add(Datenliste_scroll_Panel, gridBagConstraints);

    Datenliste_Jahr.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_JahrActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_Jahr, gridBagConstraints);

    Datenliste_Monat.setEnabled(false);
    InitComboMonat();
    Datenliste_Monat.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_MonatActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_Monat, gridBagConstraints);

    jLabel11.setText("Jahr whlen");
    jLabel11.setToolTipText("Selektier alle Daten des entsprechenden Jahres");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel11, gridBagConstraints);

    jLabel51.setText("Monat whlen");
    jLabel51.setToolTipText("Selektiert alle Daten des entsprechenden Monats");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel51, gridBagConstraints);

    Datenliste_Zeitabschnitt.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_ZeitabschnittActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_Zeitabschnitt, gridBagConstraints);

    jLabel65.setText("Zeitraum whlen");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel65, gridBagConstraints);

    jLabel66.setText("Tour-Typ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel66, gridBagConstraints);

    Datenliste_TourTyp.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_TourTypActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_TourTyp, gridBagConstraints);

    jLabel68.setText("Selektierte Daten / von");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 14;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel68, gridBagConstraints);

    jLabel69_Selektiert.setText("'                                                 '");
    jLabel69_Selektiert.setMaximumSize(new java.awt.Dimension(300, 50));
    jLabel69_Selektiert.setMinimumSize(new java.awt.Dimension(300, 50));
    jLabel69_Selektiert.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 14;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    Datenliste_Panel.add(jLabel69_Selektiert, gridBagConstraints);

    Datenliste_search.setToolTipText("~ Vorstellen um zu Deselektieren");
    Datenliste_search.setMaximumSize(new java.awt.Dimension(200, 23));
    Datenliste_search.setMinimumSize(new java.awt.Dimension(200, 23));
    Datenliste_search.setPreferredSize(new java.awt.Dimension(200, 23));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 16;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_search, gridBagConstraints);

    Datenliste_searchButton.setText("Suchen");
    Datenliste_searchButton.setMaximumSize(new java.awt.Dimension(200, 23));
    Datenliste_searchButton.setMinimumSize(new java.awt.Dimension(200, 23));
    Datenliste_searchButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Datenliste_searchButtonActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(Datenliste_searchButton, gridBagConstraints);

    jLabel_search.setText("Eintrag im Titel suchen");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 16;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Datenliste_Panel.add(jLabel_search, gridBagConstraints);

    Hauptfenster.addTab("Datenliste", null, Datenliste_Panel, "");

    Info_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Info_PanelComponentShown(evt);
        }
    });
    java.awt.GridBagLayout Info_PanelLayout = new java.awt.GridBagLayout();
    Info_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Info_PanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5,
            0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Info_Panel.setLayout(Info_PanelLayout);

    Auswahl_Info.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_InfoActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Info_Panel.add(Auswahl_Info, gridBagConstraints);

    Info_Titel.setText("jTextField1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.gridwidth = 19;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Titel, gridBagConstraints);

    Info_Vorname.setText("jTextField4");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Vorname, gridBagConstraints);

    Info_Name.setText("jTextField5");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Name, gridBagConstraints);

    Info_GebTag.setText("jTextField6");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 14;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_GebTag, gridBagConstraints);

    Info_Gewicht.setText("jTextField7");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 14;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Gewicht, gridBagConstraints);

    Info_Verein.setText("jTextField8");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 18;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Verein, gridBagConstraints);

    Info_Material.setText("jTextField10");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 22;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Material, gridBagConstraints);

    Info_Materialgewicht.setText("jTextField9");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 22;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Materialgewicht, gridBagConstraints);

    Info_Startort.setText("jTextField2");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 26;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Startort, gridBagConstraints);

    Info_Zielort.setText("jTextField3");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 26;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Zielort, gridBagConstraints);

    jLabel24Uhrzeit.setText("jLabel24");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel24Uhrzeit, gridBagConstraints);

    jLabel24.setText("Titel");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel24, gridBagConstraints);

    jLabel52.setText("Vorname");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel52, gridBagConstraints);

    jLabel53.setText("Name");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel53, gridBagConstraints);

    jLabel54.setText("Geburtsdatum");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 12;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel54, gridBagConstraints);

    jLabel55.setText("Gewicht");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 12;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel55, gridBagConstraints);

    jLabel56.setText("Verein / Mitfahrer");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 16;
    gridBagConstraints.gridwidth = 17;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel56, gridBagConstraints);

    jLabel57.setText("Material");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 20;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel57, gridBagConstraints);

    jLabel58.setText("Materialgewicht");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 20;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel58, gridBagConstraints);

    jLabel59.setText("Startort");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 24;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel59, gridBagConstraints);

    jLabel60.setText("Zielort");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 24;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel60, gridBagConstraints);

    jLabel61.setText("Notiz");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 34;
    gridBagConstraints.gridwidth = 9;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel61, gridBagConstraints);

    Info_Button_kopieren.setText("Kopieren");
    Info_Button_kopieren.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Info_Button_kopierenActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 18;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Button_kopieren, gridBagConstraints);

    Info_Button_einfgen.setText("Einfgen");
    Info_Button_einfgen.setEnabled(false);
    Info_Button_einfgen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Info_Button_einfgenActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 22;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Button_einfgen, gridBagConstraints);

    Info_Notiz.setLineWrap(true);
    jScrollPane2.setViewportView(Info_Notiz);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 36;
    gridBagConstraints.gridwidth = 19;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Info_Panel.add(jScrollPane2, gridBagConstraints);

    Info_Button_speichern.setText("Speichern");
    Info_Button_speichern.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Info_Button_speichernActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 26;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Button_speichern, gridBagConstraints);

    jLabel63.setText("Startzeit:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel63, gridBagConstraints);

    jLabel64.setText("Typ:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel64, gridBagConstraints);

    jLabel65Typ.setText("jLabel65");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel65Typ, gridBagConstraints);

    jLabel69.setText("Track Log");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 30;
    gridBagConstraints.gridwidth = 7;
    gridBagConstraints.ipady = 6;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(jLabel69, gridBagConstraints);

    Info_Button_Suche_TrackLog.setText("...");
    Info_Button_Suche_TrackLog.setToolTipText("Track Log ndern");
    Info_Button_Suche_TrackLog.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Info_Button_Suche_TrackLogActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 18;
    gridBagConstraints.gridy = 32;
    gridBagConstraints.ipady = -3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Info_Panel.add(Info_Button_Suche_TrackLog, gridBagConstraints);

    Info_Track_Log.setText("jTextField1");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 32;
    gridBagConstraints.gridwidth = 17;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    Info_Panel.add(Info_Track_Log, gridBagConstraints);

    Hauptfenster.addTab("Infos", null, Info_Panel, "");

    Statistik_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Statistik_PanelComponentShown_StatistikStarten(evt);
        }
    });
    java.awt.GridBagLayout Statistik_PanelLayout1 = new java.awt.GridBagLayout();
    Statistik_PanelLayout1.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Statistik_PanelLayout1.rowHeights = new int[] { 0, 10, 0, 10, 0, 10, 0, 10, 0 };
    Statistik_Panel.setLayout(Statistik_PanelLayout1);

    Auswahl_Statistik.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_StatistikActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Statistik_Panel.add(Auswahl_Statistik, gridBagConstraints);

    java.awt.GridBagLayout jPanel2Layout = new java.awt.GridBagLayout();
    jPanel2Layout.columnWidths = new int[] { 0, 10, 0, 10, 0, 10, 0, 10, 0 };
    jPanel2Layout.rowHeights = new int[] { 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0 };
    jPanel2.setLayout(jPanel2Layout);

    Statistik_Hhe.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Hhe [m]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Hhe.setLayout(new java.awt.GridLayout(5, 2, 5, 5));

    jLabel1.setText("min.:");
    Statistik_Hhe.add(jLabel1);

    Statistik_Minimale_Hhe.setText("---");
    Statistik_Minimale_Hhe.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
    Statistik_Hhe.add(Statistik_Minimale_Hhe);

    jLabel2.setText("max.:");
    Statistik_Hhe.add(jLabel2);

    Statistik_Maximale_Hhe.setText("---");
    Statistik_Hhe.add(Statistik_Maximale_Hhe);

    jLabel3.setText("Hm +:");
    Statistik_Hhe.add(jLabel3);

    Statistik_Summe_Hm_Steigung.setText("---");
    Statistik_Hhe.add(Statistik_Summe_Hm_Steigung);

    jLabel4.setText("Hm -:");
    Statistik_Hhe.add(jLabel4);

    Statistik_Summe_Hm_Geflle.setText("---");
    Statistik_Hhe.add(Statistik_Summe_Hm_Geflle);

    jLabel17.setText("Hm/km:");
    Statistik_Hhe.add(jLabel17);

    Statistik_HM_pro_km.setText("---");
    Statistik_Hhe.add(Statistik_HM_pro_km);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.gridheight = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Hhe, gridBagConstraints);

    Statistik_Geschwindigkeit
            .setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Geschwindigkeit [km/h]",
                    javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Geschwindigkeit.setLayout(new java.awt.GridLayout(3, 2, 5, 5));

    jLabel5.setText("max.:");
    jLabel5.setToolTipText("");
    Statistik_Geschwindigkeit.add(jLabel5);

    Statistik_Max_Geschw.setText("---");
    Statistik_Geschwindigkeit.add(Statistik_Max_Geschw);

    jLabel6.setText("Durchschnitt:");
    Statistik_Geschwindigkeit.add(jLabel6);

    Statistik_av_Geschw.setText("---");
    Statistik_Geschwindigkeit.add(Statistik_av_Geschw);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Geschwindigkeit, gridBagConstraints);

    Statistik_Herzfrequenz.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Herzfrequenz [p/min]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Herzfrequenz.setLayout(new java.awt.GridLayout(3, 2, 5, 5));

    jLabel7.setText("max.:");
    Statistik_Herzfrequenz.add(jLabel7);

    Statistik_max_HF.setText("---");
    Statistik_Herzfrequenz.add(Statistik_max_HF);

    jLabel8.setText("Durchschnitt:");
    Statistik_Herzfrequenz.add(jLabel8);

    Statistik_av_HF.setText("---");
    Statistik_Herzfrequenz.add(Statistik_av_HF);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Herzfrequenz, gridBagConstraints);

    Statistik_Steigung_m.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Steigung [m/min]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Steigung_m.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel9.setText("max.:");
    Statistik_Steigung_m.add(jLabel9);

    Statistik_max_Steigung_m.setText("---");
    Statistik_Steigung_m.add(Statistik_max_Steigung_m);

    jLabel10.setText("Durchschnitt:");
    Statistik_Steigung_m.add(jLabel10);

    Statistik_av_Steigung_m.setText("---");
    Statistik_Steigung_m.add(Statistik_av_Steigung_m);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Steigung_m, gridBagConstraints);

    Statistik_Geflle_m.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Geflle [m/min]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Geflle_m.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel12.setText("max.:");
    Statistik_Geflle_m.add(jLabel12);

    Statistik_max_Geflle_m.setText("---");
    Statistik_Geflle_m.add(Statistik_max_Geflle_m);

    jLabel13.setText("Durchschnitt:");
    Statistik_Geflle_m.add(jLabel13);

    Statistik_av_Geflle_m.setText("---");
    Statistik_Geflle_m.add(Statistik_av_Geflle_m);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Geflle_m, gridBagConstraints);

    Statistik_Temperatur.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Temperatur [C]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Temperatur.setLayout(new java.awt.GridLayout(3, 2, 5, 5));

    jLabel14.setText("min.:");
    Statistik_Temperatur.add(jLabel14);

    Statistik_min_Temp.setText("---");
    Statistik_Temperatur.add(Statistik_min_Temp);

    jLabel15.setText("max.:");
    Statistik_Temperatur.add(jLabel15);

    Statistik_max_Temp.setText("---");
    Statistik_Temperatur.add(Statistik_max_Temp);

    jLabel16.setText("Durchschnitt:");
    Statistik_Temperatur.add(jLabel16);

    Statistik_av_Temp.setText("---");
    Statistik_Temperatur.add(Statistik_av_Temp);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Temperatur, gridBagConstraints);

    Statistik_Cadence.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cadence [n/min]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Cadence.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel18.setText("max.:");
    Statistik_Cadence.add(jLabel18);

    Statistik_max_Cadence.setText("---");
    Statistik_Cadence.add(Statistik_max_Cadence);

    jLabel19.setText("Durchschnitt:");
    Statistik_Cadence.add(jLabel19);

    Statistik_av_Cadence.setText("---");
    Statistik_Cadence.add(Statistik_av_Cadence);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Cadence, gridBagConstraints);

    Statistik_Steigung_p.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Steigung [%]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Steigung_p.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel20.setText("max.:");
    Statistik_Steigung_p.add(jLabel20);

    Statistik_max_Steigung_p.setText("---");
    Statistik_Steigung_p.add(Statistik_max_Steigung_p);

    jLabel21.setText("Durchschnitt:");
    Statistik_Steigung_p.add(jLabel21);

    Statistik_av_Steigung_p.setText("---");
    Statistik_Steigung_p.add(Statistik_av_Steigung_p);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Steigung_p, gridBagConstraints);

    Statistik_Geflle_p.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Geflle [%]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Geflle_p.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel22.setText("max.:");
    Statistik_Geflle_p.add(jLabel22);

    Statistik_max_Geflle_p.setText("---");
    Statistik_Geflle_p.add(Statistik_max_Geflle_p);

    jLabel23.setText("Durchschnitt:");
    Statistik_Geflle_p.add(jLabel23);

    Statistik_av_Geflle_p.setText("---");
    Statistik_Geflle_p.add(Statistik_av_Geflle_p);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Geflle_p, gridBagConstraints);

    Statistik_Zeit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Zeit [hh:mm:ss]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Zeit.setLayout(new java.awt.GridLayout(3, 2, 5, 5));

    jLabel47.setText("absolut:");
    Statistik_Zeit.add(jLabel47);

    Statistik_Zeit_absolut.setText("---");
    Statistik_Zeit.add(Statistik_Zeit_absolut);

    jLabel48.setText("gefahren:");
    Statistik_Zeit.add(jLabel48);

    Statistik_Zeit_aktiv.setText("---");
    Statistik_Zeit.add(Statistik_Zeit_aktiv);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Zeit, gridBagConstraints);

    jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Zoom",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    jPanel5.setPreferredSize(new java.awt.Dimension(270, 65));
    jPanel5.setLayout(new java.awt.GridLayout(1, 0));

    jLabel25.setText("Teilstrecke:  ");
    jLabel25.setMaximumSize(new java.awt.Dimension(200, 26));
    jLabel25.setMinimumSize(new java.awt.Dimension(200, 26));
    jLabel25.setPreferredSize(new java.awt.Dimension(200, 26));
    jPanel5.add(jLabel25);

    Statistik_Teilstrecke.setText("jLabel26");
    jPanel5.add(Statistik_Teilstrecke);
    Statistik_Teilstrecke.getAccessibleContext().setAccessibleName("jLabel26_Teilstrecke");

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
    jPanel2.add(jPanel5, gridBagConstraints);

    Statistik_Schrittlnge.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Schrittlnge [cm]",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Schrittlnge.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

    jLabel26.setText("max.:");
    Statistik_Schrittlnge.add(jLabel26);

    Statistik_max_Schrittlnge.setText("---");
    Statistik_Schrittlnge.add(Statistik_max_Schrittlnge);

    jLabel28.setText("Durchschnitt:");
    Statistik_Schrittlnge.add(jLabel28);

    Statistik_av_Schrittlnge.setText("---");
    Statistik_Schrittlnge.add(Statistik_av_Schrittlnge);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Schrittlnge, gridBagConstraints);

    Statistik_Training.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Training",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Training.setLayout(new java.awt.GridLayout(4, 2, 5, 5));

    jLabel29.setText("Belastung:");
    Statistik_Training.add(jLabel29);

    Statistik_Belastung.setText("---");
    Statistik_Training.add(Statistik_Belastung);

    jLabel30.setText("Erholungszeit:");
    Statistik_Training.add(jLabel30);

    Statistik_Erholungszeit.setText("---");
    Statistik_Training.add(Statistik_Erholungszeit);

    jLabel35.setText("Lauf-Index:");
    Statistik_Training.add(jLabel35);

    Statistik_Lauf_Index.setText("---");
    Statistik_Training.add(Statistik_Lauf_Index);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Training, gridBagConstraints);

    Statistik_Kalorien.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Kalorien",
            javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
    Statistik_Kalorien.setLayout(new java.awt.GridLayout(4, 2, 5, 5));

    jLabel31.setText("kCal");
    Statistik_Kalorien.add(jLabel31);

    Statistik_Kalorien_absolut.setText("---");
    Statistik_Kalorien.add(Statistik_Kalorien_absolut);

    jLabel34.setText("kCal/h");
    Statistik_Kalorien.add(jLabel34);

    Statistik_Kalorien_h.setText("---");
    Statistik_Kalorien.add(Statistik_Kalorien_h);

    jLabel32.setText("Fett [%]");
    Statistik_Kalorien.add(jLabel32);

    Statistik_Fett.setText("---");
    Statistik_Kalorien.add(Statistik_Fett);

    jLabel33.setText("Protein [%]");
    Statistik_Kalorien.add(jLabel33);

    Statistik_Protein.setText("---");
    Statistik_Kalorien.add(Statistik_Protein);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(Statistik_Kalorien, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Statistik_Panel.add(jPanel2, gridBagConstraints);

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
    gridBagConstraints.weighty = 100.0;
    Statistik_Panel.add(jPanel3, gridBagConstraints);

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 100.0;
    Statistik_Panel.add(jPanel4, gridBagConstraints);

    Statistik_Titel.setText("jLabel26");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Statistik_Panel.add(Statistik_Titel, gridBagConstraints);

    Hauptfenster.addTab("Statistik", null, Statistik_Panel, "");

    Graphik_Panel.setMinimumSize(new java.awt.Dimension(22, 22));
    Graphik_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Graphik_PanelComponentShown(evt);
        }

        public void componentHidden(java.awt.event.ComponentEvent evt) {
            Graphik_PanelComponentHidden(evt);
        }
    });
    java.awt.GridBagLayout Graphik_PanelLayout = new java.awt.GridBagLayout();
    Graphik_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Graphik_PanelLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0 };
    Graphik_Panel.setLayout(Graphik_PanelLayout);

    Auswahl_Graphik.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_GraphikActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.ipady = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Graphik_Panel.add(Auswahl_Graphik, gridBagConstraints);

    Graphik_Sub_Panel.setMinimumSize(new java.awt.Dimension(0, 0));
    Graphik_Sub_Panel.setPreferredSize(new java.awt.Dimension(0, 0));

    javax.swing.GroupLayout Graphik_Sub_PanelLayout = new javax.swing.GroupLayout(Graphik_Sub_Panel);
    Graphik_Sub_Panel.setLayout(Graphik_Sub_PanelLayout);
    Graphik_Sub_PanelLayout.setHorizontalGroup(Graphik_Sub_PanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    Graphik_Sub_PanelLayout.setVerticalGroup(Graphik_Sub_PanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 15;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Graphik_Panel.add(Graphik_Sub_Panel, gridBagConstraints);

    Graphik_check_Geschwindigkeit.setText("Geschwindigkeit");
    Graphik_check_Geschwindigkeit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_GeschwindigkeitActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Geschwindigkeit, gridBagConstraints);

    Graphik_check_Hhe.setText("Hhe");
    Graphik_check_Hhe.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_HheActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Hhe, gridBagConstraints);

    Graphik_check_HF.setText("Herzfrequenz");
    Graphik_check_HF.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_HFActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_HF, gridBagConstraints);

    Graphik_check_Temp.setText("Temperatur");
    Graphik_check_Temp.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_TempActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 14;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Temp, gridBagConstraints);

    Graphik_check_Steigung_p.setText("Steigung [%]");
    Graphik_check_Steigung_p.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_Steigung_pActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Steigung_p, gridBagConstraints);

    Graphik_check_Steigung_m.setText("Steigung [m/min]");
    Graphik_check_Steigung_m.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_Steigung_mActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 12;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Steigung_m, gridBagConstraints);

    Graphik_check_Cadence.setText("Cadence");
    Graphik_check_Cadence.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_CadenceActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Cadence, gridBagConstraints);

    Graphik_Radio_Strecke.setSelected(true);
    Graphik_Radio_Strecke.setText("ber Strecke");
    Graphik_Radio_Strecke.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_Radio_StreckeActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);
    Graphik_Panel.add(Graphik_Radio_Strecke, gridBagConstraints);

    Graphik_Radio_Zeit.setText("ber Zeit");
    Graphik_Radio_Zeit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_Radio_ZeitActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.ipady = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);
    Graphik_Panel.add(Graphik_Radio_Zeit, gridBagConstraints);

    Graphik_check_Abstand.setText("Zeit- / Streckenabstand");
    Graphik_check_Abstand.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_AbstandActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 14;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipadx = 27;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Abstand, gridBagConstraints);

    Graphik_check_av_Geschw.setText("av-Geschw.");
    Graphik_check_av_Geschw.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_av_GeschwActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_av_Geschw, gridBagConstraints);

    Graphik_check_Schrittlnge.setText("Schrittlnge");
    Graphik_check_Schrittlnge.setToolTipText("");
    Graphik_check_Schrittlnge.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Graphik_check_SchrittlngeActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    Graphik_Panel.add(Graphik_check_Schrittlnge, gridBagConstraints);

    Hauptfenster.addTab("Graphik", null, Graphik_Panel, "");

    Histogramm_Panel.setMinimumSize(new java.awt.Dimension(22, 22));
    Histogramm_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Histogramm_PanelComponentShown(evt);
        }
    });
    java.awt.GridBagLayout Histogramm_PanelLayout = new java.awt.GridBagLayout();
    Histogramm_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0 };
    Histogramm_PanelLayout.rowHeights = new int[] { 0, 0, 0, 0, 0 };
    Histogramm_Panel.setLayout(Histogramm_PanelLayout);

    Auswahl_Histogramm.setAlignmentX(0.0F);
    Auswahl_Histogramm.setAlignmentY(0.0F);
    Auswahl_Histogramm.setMinimumSize(new java.awt.Dimension(200, 20));
    Auswahl_Histogramm.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_HistogrammActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Histogramm_Panel.add(Auswahl_Histogramm, gridBagConstraints);

    Summenhistogramm_Check.setText("Summenhistogramme");
    Summenhistogramm_Check.setAlignmentY(0.0F);
    Summenhistogramm_Check.setMaximumSize(new java.awt.Dimension(32767, 32767));
    Summenhistogramm_Check.setMinimumSize(new java.awt.Dimension(300, 23));
    Summenhistogramm_Check.setOpaque(false);
    Summenhistogramm_Check.setPreferredSize(new java.awt.Dimension(300, 23));
    Summenhistogramm_Check.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Summenhistogramm_CheckActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Histogramm_Panel.add(Summenhistogramm_Check, gridBagConstraints);

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

    jPanel18_HistoSP.setAlignmentX(0.0F);
    jPanel18_HistoSP.setAlignmentY(0.0F);

    javax.swing.GroupLayout jPanel18_HistoSPLayout = new javax.swing.GroupLayout(jPanel18_HistoSP);
    jPanel18_HistoSP.setLayout(jPanel18_HistoSPLayout);
    jPanel18_HistoSPLayout.setHorizontalGroup(jPanel18_HistoSPLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel18_HistoSPLayout.setVerticalGroup(jPanel18_HistoSPLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 0.5;
    jPanel1.add(jPanel18_HistoSP, gridBagConstraints);

    jPanel17_HistoHM.setAlignmentX(0.0F);
    jPanel17_HistoHM.setAlignmentY(0.0F);

    javax.swing.GroupLayout jPanel17_HistoHMLayout = new javax.swing.GroupLayout(jPanel17_HistoHM);
    jPanel17_HistoHM.setLayout(jPanel17_HistoHMLayout);
    jPanel17_HistoHMLayout.setHorizontalGroup(jPanel17_HistoHMLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel17_HistoHMLayout.setVerticalGroup(jPanel17_HistoHMLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 0.5;
    jPanel1.add(jPanel17_HistoHM, gridBagConstraints);

    jPanel16_HistoHF.setAlignmentX(0.0F);
    jPanel16_HistoHF.setAlignmentY(0.0F);

    javax.swing.GroupLayout jPanel16_HistoHFLayout = new javax.swing.GroupLayout(jPanel16_HistoHF);
    jPanel16_HistoHF.setLayout(jPanel16_HistoHFLayout);
    jPanel16_HistoHFLayout.setHorizontalGroup(jPanel16_HistoHFLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel16_HistoHFLayout.setVerticalGroup(jPanel16_HistoHFLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 0.5;
    jPanel1.add(jPanel16_HistoHF, gridBagConstraints);

    jPanel19_HistoCd.setAlignmentX(0.0F);
    jPanel19_HistoCd.setAlignmentY(0.0F);

    javax.swing.GroupLayout jPanel19_HistoCdLayout = new javax.swing.GroupLayout(jPanel19_HistoCd);
    jPanel19_HistoCd.setLayout(jPanel19_HistoCdLayout);
    jPanel19_HistoCdLayout.setHorizontalGroup(jPanel19_HistoCdLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
    jPanel19_HistoCdLayout.setVerticalGroup(jPanel19_HistoCdLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.weighty = 0.5;
    jPanel1.add(jPanel19_HistoCd, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 5;
    gridBagConstraints.gridheight = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Histogramm_Panel.add(jPanel1, gridBagConstraints);

    jLabel26_Histotitel.setText("jLabel26");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    Histogramm_Panel.add(jLabel26_Histotitel, gridBagConstraints);

    Hauptfenster.addTab("Histogramme", null, Histogramm_Panel, "");

    Map_Panel.setPreferredSize(new java.awt.Dimension(594, 400));
    Map_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Map_PanelComponentShown(evt);
        }
    });
    java.awt.GridBagLayout Map_PanelLayout = new java.awt.GridBagLayout();
    Map_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Map_PanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0 };
    Map_Panel.setLayout(Map_PanelLayout);

    Auswahl_Map.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_MapActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Map_Panel.add(Auswahl_Map, gridBagConstraints);

    LoadGoogleEarth.setText("Google Earth");
    LoadGoogleEarth.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            LoadGoogleEarthActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Map_Panel.add(LoadGoogleEarth, gridBagConstraints);

    Kein_kmz_text.setText("Kein Log File");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Map_Panel.add(Kein_kmz_text, gridBagConstraints);

    Map_internal_Panel.setLayout(null);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 11;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Map_Panel.add(Map_internal_Panel, gridBagConstraints);

    jLabel_map_streckenlnge.setText("jLabel26");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    Map_Panel.add(jLabel_map_streckenlnge, gridBagConstraints);

    jLabel27.setText("GPS Lnge:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    Map_Panel.add(jLabel27, gridBagConstraints);

    Map_Type.setModel(
            new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    Map_Type.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Map_TypeActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Map_Panel.add(Map_Type, gridBagConstraints);

    Hauptfenster.addTab("Landkarte", Map_Panel);

    Jahresuebersicht_Panel.setPreferredSize(new java.awt.Dimension(688, 400));
    Jahresuebersicht_Panel.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            Jahresuebersicht_PanelComponentShown(evt);
        }
    });
    java.awt.GridBagLayout Jahresuebersicht_PanelLayout = new java.awt.GridBagLayout();
    Jahresuebersicht_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 };
    Jahresuebersicht_PanelLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
    Jahresuebersicht_Panel.setLayout(Jahresuebersicht_PanelLayout);

    Auswahl_bersicht.setMinimumSize(new java.awt.Dimension(200, 20));
    Auswahl_bersicht.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            Auswahl_bersichtActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(Auswahl_bersicht, gridBagConstraints);

    JahrVergleich.setMinimumSize(new java.awt.Dimension(200, 20));
    JahrVergleich.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            JahrVergleichActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(JahrVergleich, gridBagConstraints);

    jLabel67.setText("Vergleich mit Jahr:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(jLabel67, gridBagConstraints);

    jLabel70.setText("   Jahr:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(jLabel70, gridBagConstraints);

    jRadioButton_jahresverlauf.setSelected(true);
    jRadioButton_jahresverlauf.setText("Jahresverlauf");
    jRadioButton_jahresverlauf.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton_jahresverlaufActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(jRadioButton_jahresverlauf, gridBagConstraints);

    jRadioButton_monatsbersicht.setText("Monatsbersicht");
    jRadioButton_monatsbersicht.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButton_monatsbersichtActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 10;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    Jahresuebersicht_Panel.add(jRadioButton_monatsbersicht, gridBagConstraints);

    jPanel17bersichtchart
            .setLayout(new javax.swing.BoxLayout(jPanel17bersichtchart, javax.swing.BoxLayout.LINE_AXIS));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 11;
    gridBagConstraints.gridheight = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    Jahresuebersicht_Panel.add(jPanel17bersichtchart, gridBagConstraints);

    Hauptfenster.addTab("Jahresbersicht", null, Jahresuebersicht_Panel, "");

    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(Hauptfenster, gridBagConstraints);

    jMenuDatei.setLabel("Datei     ");

    jMenuOpen.setText("Rohdaten Importieren");
    jMenuOpen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuOpenActionPerformed(evt);
        }
    });
    jMenuDatei.add(jMenuOpen);

    jMenuOpenall.setText("Alle Rohdaten Importieren");
    jMenuOpenall.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuOpenallActionPerformed(evt);
        }
    });
    jMenuDatei.add(jMenuOpenall);
    jMenuDatei.add(jSeparator1);

    jMenuLschen.setText("Lschen");
    jMenuLschen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuLschenActionPerformed(evt);
        }
    });
    jMenuDatei.add(jMenuLschen);

    jMenuExit.setText("Beenden");
    jMenuExit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuExitActionPerformed(evt);
        }
    });
    jMenuDatei.add(jMenuExit);

    jMenuHaupt.add(jMenuDatei);

    jMenu_V800_Laden.setText("Daten Empfangen     ");
    jMenu_V800_Laden.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jMenu_V800_LadenMouseClicked(evt);
        }
    });
    jMenuHaupt.add(jMenu_V800_Laden);

    jMenuTourEditor.setLabel("Tour Editor     ");
    jMenuTourEditor.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jMenuTourEditorMouseClicked(evt);
        }
    });
    jMenuHaupt.add(jMenuTourEditor);
    jMenuTourEditor.getAccessibleContext().setAccessibleName("Tour Editor");

    jMenuEinstellungen.setLabel("Einstellungen     ");
    jMenuEinstellungen.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jMenuEinstellungenMouseClicked(evt);
        }
    });
    jMenuHaupt.add(jMenuEinstellungen);

    jMenuHilfe.setText("Hilfe");
    jMenuHilfe.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jMenuHilfeMouseClicked(evt);
        }
    });
    jMenuHaupt.add(jMenuHilfe);

    setJMenuBar(jMenuHaupt);

    pack();
}

From source file:ca.uhn.hl7v2.testpanel.ui.conn.Hl7ConnectionPanel.java

/**
 * Create the panel./*www.  j av  a 2 s. c om*/
 */
public Hl7ConnectionPanel(Controller theController) {
    setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] { 150, 0 };
    gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
    gridBagLayout.columnWeights = new double[] { 0.0, 1.0 };
    gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE };
    setLayout(gridBagLayout);

    mySinglePortRadio = new JRadioButton("Single Port MLLP");
    mySinglePortRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updatePortsModel();
            updatePortsUi();
        }
    });
    myPortButtonGroup.add(mySinglePortRadio);
    GridBagConstraints gbc_SinglePortRadio = new GridBagConstraints();
    gbc_SinglePortRadio.anchor = GridBagConstraints.WEST;
    gbc_SinglePortRadio.insets = new Insets(0, 0, 5, 5);
    gbc_SinglePortRadio.gridx = 0;
    gbc_SinglePortRadio.gridy = 0;
    add(mySinglePortRadio, gbc_SinglePortRadio);

    JPanel panel_4 = new JPanel();
    panel_4.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_4 = new GridBagConstraints();
    gbc_panel_4.fill = GridBagConstraints.BOTH;
    gbc_panel_4.insets = new Insets(0, 0, 5, 0);
    gbc_panel_4.gridx = 1;
    gbc_panel_4.gridy = 0;
    add(panel_4, gbc_panel_4);
    GridBagLayout gbl_panel_4 = new GridBagLayout();
    gbl_panel_4.columnWidths = new int[] { 0, 0, 0 };
    gbl_panel_4.rowHeights = new int[] { 0, 0 };
    gbl_panel_4.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
    gbl_panel_4.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel_4.setLayout(gbl_panel_4);

    mySinglePortTextBox = new JTextField();
    mySinglePortTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = mySinglePortTextBox.getText();
            text = text.replaceAll("[^0-9]+", "");
            if (!StringUtils.equals(mySinglePortTextBox.getText(), text)) {
                final String newVal = text;
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        mySinglePortTextBox.setText(newVal);
                    }
                });
            }
            if (mySinglePortRadio.isSelected()) {
                if (text.length() > 0) {
                    myConnection.setIncomingOrSinglePort(Integer.parseInt(text));
                } else {
                    myConnection.setIncomingOrSinglePort(-1);
                }
            }
        }
    });

    mylabel = new JLabel("Port");
    mylabel.setHorizontalAlignment(SwingConstants.CENTER);
    mylabel.setPreferredSize(new Dimension(60, 16));
    mylabel.setMinimumSize(new Dimension(60, 16));
    mylabel.setMaximumSize(new Dimension(60, 16));
    GridBagConstraints gbc_label = new GridBagConstraints();
    gbc_label.anchor = GridBagConstraints.EAST;
    gbc_label.insets = new Insets(0, 0, 0, 5);
    gbc_label.gridx = 0;
    gbc_label.gridy = 0;
    panel_4.add(mylabel, gbc_label);
    GridBagConstraints gbc_SinglePortTextBox = new GridBagConstraints();
    gbc_SinglePortTextBox.insets = new Insets(0, 5, 0, 0);
    gbc_SinglePortTextBox.anchor = GridBagConstraints.WEST;
    gbc_SinglePortTextBox.gridx = 1;
    gbc_SinglePortTextBox.gridy = 0;
    panel_4.add(mySinglePortTextBox, gbc_SinglePortTextBox);
    mySinglePortTextBox.setMinimumSize(new Dimension(100, 28));
    mySinglePortTextBox.setMaximumSize(new Dimension(100, 2147483647));
    mySinglePortTextBox.setColumns(10);

    myDualPortRadio = new JRadioButton("Dual Port MLLP");
    myDualPortRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updatePortsModel();
            updatePortsUi();
        }
    });
    myPortButtonGroup.add(myDualPortRadio);
    GridBagConstraints gbc_DualPortRadio = new GridBagConstraints();
    gbc_DualPortRadio.anchor = GridBagConstraints.WEST;
    gbc_DualPortRadio.insets = new Insets(0, 0, 5, 5);
    gbc_DualPortRadio.gridx = 0;
    gbc_DualPortRadio.gridy = 1;
    add(myDualPortRadio, gbc_DualPortRadio);

    JPanel panel = new JPanel();
    panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_BottomPanel = new GridBagConstraints();
    gbc_BottomPanel.insets = new Insets(0, 0, 5, 0);
    gbc_BottomPanel.fill = GridBagConstraints.BOTH;
    gbc_BottomPanel.gridx = 1;
    gbc_BottomPanel.gridy = 1;
    add(panel, gbc_BottomPanel);
    GridBagLayout gbl_panel = new GridBagLayout();
    gbl_panel.columnWidths = new int[] { 0, 0, 0, 0, 0, 0 };
    gbl_panel.rowHeights = new int[] { 0, 0 };
    gbl_panel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
    gbl_panel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel.setLayout(gbl_panel);

    JLabel lblInbound = new JLabel("Inbound");
    lblInbound.setHorizontalAlignment(SwingConstants.CENTER);
    lblInbound.setPreferredSize(new Dimension(60, 16));
    lblInbound.setMinimumSize(new Dimension(60, 16));
    lblInbound.setMaximumSize(new Dimension(60, 16));
    GridBagConstraints gbc_lblInbound = new GridBagConstraints();
    gbc_lblInbound.insets = new Insets(0, 5, 0, 5);
    gbc_lblInbound.anchor = GridBagConstraints.EAST;
    gbc_lblInbound.gridx = 0;
    gbc_lblInbound.gridy = 0;
    panel.add(lblInbound, gbc_lblInbound);

    myDualIncomingTextBox = new JTextField();
    myDualIncomingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = myDualIncomingTextBox.getText();
            text = text.replaceAll("[^0-9]+", "");
            if (!StringUtils.equals(myDualIncomingTextBox.getText(), text)) {
                final String newVal = text;
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        myDualIncomingTextBox.setText(newVal);
                    }
                });
            }
            if (myDualPortRadio.isSelected()) {
                if (text.length() > 0) {
                    myConnection.setIncomingOrSinglePort(Integer.parseInt(text));
                } else {
                    myConnection.setIncomingOrSinglePort(-1);
                }
            }
        }
    });
    myDualIncomingTextBox.setMaximumSize(new Dimension(100, 2147483647));
    myDualIncomingTextBox.setMinimumSize(new Dimension(100, 28));
    GridBagConstraints gbc_DualIncomingTextBox = new GridBagConstraints();
    gbc_DualIncomingTextBox.anchor = GridBagConstraints.WEST;
    gbc_DualIncomingTextBox.insets = new Insets(0, 0, 0, 5);
    gbc_DualIncomingTextBox.gridx = 1;
    gbc_DualIncomingTextBox.gridy = 0;
    panel.add(myDualIncomingTextBox, gbc_DualIncomingTextBox);
    myDualIncomingTextBox.setColumns(10);

    JLabel lblOutbound = new JLabel("Outbound");
    GridBagConstraints gbc_lblOutbound = new GridBagConstraints();
    gbc_lblOutbound.anchor = GridBagConstraints.EAST;
    gbc_lblOutbound.insets = new Insets(0, 0, 0, 5);
    gbc_lblOutbound.gridx = 2;
    gbc_lblOutbound.gridy = 0;
    panel.add(lblOutbound, gbc_lblOutbound);

    myDualOutgoingTextBox = new JTextField();
    myDualOutgoingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = myDualOutgoingTextBox.getText();
            text = text.replaceAll("[^0-9]+", "");
            if (!StringUtils.equals(myDualOutgoingTextBox.getText(), text)) {
                final String newVal = text;
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        myDualOutgoingTextBox.setText(newVal);
                    }
                });
            }
            if (myDualPortRadio.isSelected()) {
                if (text.length() > 0) {
                    myConnection.setOutgoingPort(Integer.parseInt(text));
                } else {
                    myConnection.setOutgoingPort(-1);
                }
            }
        }
    });
    myDualOutgoingTextBox.setMinimumSize(new Dimension(100, 28));
    myDualOutgoingTextBox.setMaximumSize(new Dimension(100, 2147483647));
    GridBagConstraints gbc_DualOutgoingTextBox = new GridBagConstraints();
    gbc_DualOutgoingTextBox.insets = new Insets(0, 0, 0, 5);
    gbc_DualOutgoingTextBox.anchor = GridBagConstraints.WEST;
    gbc_DualOutgoingTextBox.gridx = 3;
    gbc_DualOutgoingTextBox.gridy = 0;
    panel.add(myDualOutgoingTextBox, gbc_DualOutgoingTextBox);
    myDualOutgoingTextBox.setColumns(10);

    myHl7OverHttpRadioButton = new JRadioButton("HL7 over HTTP");
    myHl7OverHttpRadioButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updatePortsModel();
            updatePortsUi();
        }
    });
    myPortButtonGroup.add(myHl7OverHttpRadioButton);
    GridBagConstraints gbc_Hl7OverHttpRadioButton = new GridBagConstraints();
    gbc_Hl7OverHttpRadioButton.anchor = GridBagConstraints.WEST;
    gbc_Hl7OverHttpRadioButton.insets = new Insets(0, 0, 5, 5);
    gbc_Hl7OverHttpRadioButton.gridx = 0;
    gbc_Hl7OverHttpRadioButton.gridy = 2;
    add(myHl7OverHttpRadioButton, gbc_Hl7OverHttpRadioButton);

    mypanel = new JPanel();
    mypanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel = new GridBagConstraints();
    gbc_panel.insets = new Insets(0, 0, 5, 0);
    gbc_panel.fill = GridBagConstraints.BOTH;
    gbc_panel.gridx = 1;
    gbc_panel.gridy = 2;
    add(mypanel, gbc_panel);
    GridBagLayout gbl_panel2 = new GridBagLayout();
    gbl_panel2.columnWidths = new int[] { 0, 0 };
    gbl_panel2.rowHeights = new int[] { 0, 0 };
    gbl_panel2.columnWeights = new double[] { 0.0, 1.0 };
    gbl_panel2.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    mypanel.setLayout(gbl_panel2);

    mylabel_1 = new JLabel("URL");
    mylabel_1.setHorizontalAlignment(SwingConstants.CENTER);
    mylabel_1.setPreferredSize(new Dimension(60, 16));
    mylabel_1.setMinimumSize(new Dimension(60, 16));
    mylabel_1.setMaximumSize(new Dimension(60, 16));
    GridBagConstraints gbc_label_1 = new GridBagConstraints();
    gbc_label_1.anchor = GridBagConstraints.EAST;
    gbc_label_1.insets = new Insets(0, 0, 0, 5);
    gbc_label_1.gridx = 0;
    gbc_label_1.gridy = 0;
    mypanel.add(mylabel_1, gbc_label_1);

    myHoHUrlTextField = new JTextField();
    myHoHUrlTextField.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            if (myHohUrlTextFieldUpdating) {
                return;
            }

            String value = myHoHUrlTextField.getText();
            try {
                URL url = new URL(value);
                boolean tls;
                if (url.getProtocol().equals("http")) {
                    tls = false;
                } else if (url.getProtocol().equals("https")) {
                    tls = true;
                } else {
                    ourLog.info("Unknown protocol: {}", url.getProtocol());
                    myHoHUrlTextField.setBackground(ERROR_BG);
                    return;
                }

                myConnection.setTls(tls);
                myConnection.setHost(url.getHost());
                myConnection
                        .setIncomingOrSinglePort(url.getPort() != -1 ? url.getPort() : url.getDefaultPort());
                myConnection.setHttpUriPath(url.getPath());

                myHohUrlTextFieldUpdating = true;
                updatePortsUi();
                myHohUrlTextFieldUpdating = false;

                myTlsCheckbox.setSelected(tls);
                myHohTlsCheckbox.setSelected(tls);

                myHoHUrlTextField.setBackground(Color.white);
            } catch (MalformedURLException e) {
                myHoHUrlTextField.setBackground(ERROR_BG);
            }

        }
    });
    GridBagConstraints gbc_HohUsernameTextbox = new GridBagConstraints();
    gbc_HohUsernameTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohUsernameTextbox.gridx = 1;
    gbc_HohUsernameTextbox.gridy = 0;
    mypanel.add(myHoHUrlTextField, gbc_HohUsernameTextbox);
    myHoHUrlTextField.setColumns(10);

    JLabel lblEncoding = new JLabel("Encoding");
    GridBagConstraints gbc_lblEncoding = new GridBagConstraints();
    gbc_lblEncoding.insets = new Insets(0, 0, 5, 5);
    gbc_lblEncoding.gridx = 0;
    gbc_lblEncoding.gridy = 3;
    add(lblEncoding, gbc_lblEncoding);

    JPanel encodingPanel = new JPanel();
    GridBagConstraints gbc_encodingPanel = new GridBagConstraints();
    gbc_encodingPanel.fill = GridBagConstraints.HORIZONTAL;
    gbc_encodingPanel.insets = new Insets(0, 0, 5, 0);
    gbc_encodingPanel.gridx = 1;
    gbc_encodingPanel.gridy = 3;
    add(encodingPanel, gbc_encodingPanel);
    encodingPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gbl_encodingPanel = new GridBagLayout();
    gbl_encodingPanel.columnWidths = new int[] { 144, 58, 0 };
    gbl_encodingPanel.rowHeights = new int[] { 23, 0 };
    gbl_encodingPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
    gbl_encodingPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    encodingPanel.setLayout(gbl_encodingPanel);

    myXmlRadio = new JRadioButton("XML");
    myXmlRadio.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent theE) {
            updateEncodingModel();
        }
    });

    myEr7Radio = new JRadioButton("ER7 (Pipe and hat)");
    myEr7Radio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateEncodingModel();
        }
    });
    encodingButtonGroup.add(myEr7Radio);
    GridBagConstraints gbc_Er7Radio = new GridBagConstraints();
    gbc_Er7Radio.anchor = GridBagConstraints.NORTHWEST;
    gbc_Er7Radio.insets = new Insets(0, 0, 0, 5);
    gbc_Er7Radio.gridx = 0;
    gbc_Er7Radio.gridy = 0;
    encodingPanel.add(myEr7Radio, gbc_Er7Radio);
    encodingButtonGroup.add(myXmlRadio);
    GridBagConstraints gbc_XmlRadio = new GridBagConstraints();
    gbc_XmlRadio.anchor = GridBagConstraints.NORTHWEST;
    gbc_XmlRadio.gridx = 1;
    gbc_XmlRadio.gridy = 0;
    encodingPanel.add(myXmlRadio, gbc_XmlRadio);

    JLabel lblCharset = new JLabel("Charset");
    GridBagConstraints gbc_lblCharset = new GridBagConstraints();
    gbc_lblCharset.insets = new Insets(0, 0, 5, 5);
    gbc_lblCharset.gridx = 0;
    gbc_lblCharset.gridy = 4;
    add(lblCharset, gbc_lblCharset);

    JPanel panel_2 = new JPanel();
    GridBagConstraints gbc_panel_2 = new GridBagConstraints();
    gbc_panel_2.fill = GridBagConstraints.HORIZONTAL;
    gbc_panel_2.insets = new Insets(0, 0, 5, 0);
    gbc_panel_2.gridx = 1;
    gbc_panel_2.gridy = 4;
    add(panel_2, gbc_panel_2);
    panel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gbl_panel_2 = new GridBagLayout();
    gbl_panel_2.columnWidths = new int[] { 28, 198, 0, 0 };
    gbl_panel_2.rowHeights = new int[] { 27, 0 };
    gbl_panel_2.columnWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    gbl_panel_2.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel_2.setLayout(gbl_panel_2);

    myCharsetSelectRadio = new JRadioButton("");
    myCharsetSelectRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateCharsetModel();
        }
    });
    charsetButtonGroup.add(myCharsetSelectRadio);
    GridBagConstraints gbc_CharsetSelectRadio = new GridBagConstraints();
    gbc_CharsetSelectRadio.anchor = GridBagConstraints.WEST;
    gbc_CharsetSelectRadio.insets = new Insets(0, 0, 0, 5);
    gbc_CharsetSelectRadio.gridx = 0;
    gbc_CharsetSelectRadio.gridy = 0;
    panel_2.add(myCharsetSelectRadio, gbc_CharsetSelectRadio);

    myCharsetCombo = new JComboBox();
    myCharsetCombo.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateCharsetModel();
        }
    });
    GridBagConstraints gbc_CharsetCombo = new GridBagConstraints();
    gbc_CharsetCombo.anchor = GridBagConstraints.NORTHWEST;
    gbc_CharsetCombo.insets = new Insets(0, 0, 0, 5);
    gbc_CharsetCombo.gridx = 1;
    gbc_CharsetCombo.gridy = 0;
    panel_2.add(myCharsetCombo, gbc_CharsetCombo);

    myCharsetDetectRadio = new JRadioButton("Detect in Message (MSH-18)");
    myCharsetDetectRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateCharsetModel();
        }
    });
    charsetButtonGroup.add(myCharsetDetectRadio);
    GridBagConstraints gbc_CharsetDetectRadio = new GridBagConstraints();
    gbc_CharsetDetectRadio.anchor = GridBagConstraints.NORTH;
    gbc_CharsetDetectRadio.gridwidth = 2;
    gbc_CharsetDetectRadio.gridx = 2;
    gbc_CharsetDetectRadio.gridy = 0;
    panel_2.add(myCharsetDetectRadio, gbc_CharsetDetectRadio);

    mylabel_5 = new JLabel("Debug");
    GridBagConstraints gbc_label_5 = new GridBagConstraints();
    gbc_label_5.insets = new Insets(0, 0, 5, 5);
    gbc_label_5.gridx = 0;
    gbc_label_5.gridy = 5;
    add(mylabel_5, gbc_label_5);

    mypanel_2 = new JPanel();
    mypanel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_75 = new GridBagConstraints();
    gbc_panel_75.insets = new Insets(0, 0, 5, 0);
    gbc_panel_75.fill = GridBagConstraints.BOTH;
    gbc_panel_75.gridx = 1;
    gbc_panel_75.gridy = 5;
    add(mypanel_2, gbc_panel_75);
    GridBagLayout gbl_panel_74 = new GridBagLayout();
    gbl_panel_74.columnWidths = new int[] { 0, 0 };
    gbl_panel_74.rowHeights = new int[] { 0, 0 };
    gbl_panel_74.columnWeights = new double[] { 0.0, Double.MIN_VALUE };
    gbl_panel_74.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    mypanel_2.setLayout(gbl_panel_74);

    myCaptureByteStreamCheckbox = new JCheckBox("Capture Bytes");
    GridBagConstraints gbc_CaptureByteStreamCheckbox = new GridBagConstraints();
    gbc_CaptureByteStreamCheckbox.gridx = 0;
    gbc_CaptureByteStreamCheckbox.gridy = 0;
    mypanel_2.add(myCaptureByteStreamCheckbox, gbc_CaptureByteStreamCheckbox);
    myCaptureByteStreamCheckbox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myConnection.setCaptureBytes(myCaptureByteStreamCheckbox.isSelected());
        }
    });
    myCaptureByteStreamCheckbox.setToolTipText("Check this box to capture the transport level communication");

    myInterfaceTypeCardPanel = new JPanel();
    myInterfaceTypeCardPanel.setBorder(null);
    GridBagConstraints gbc_InterfaceTypeCardPanel = new GridBagConstraints();
    gbc_InterfaceTypeCardPanel.gridwidth = 2;
    gbc_InterfaceTypeCardPanel.fill = GridBagConstraints.BOTH;
    gbc_InterfaceTypeCardPanel.gridx = 0;
    gbc_InterfaceTypeCardPanel.gridy = 6;
    add(myInterfaceTypeCardPanel, gbc_InterfaceTypeCardPanel);
    myInterfaceTypeCardPanel.setLayout(new CardLayout(0, 0));

    myMllpCard = new JPanel();
    myMllpCard.setBorder(null);
    myInterfaceTypeCardPanel.add(myMllpCard, IFACE_TYPE_CARD_MLLP);
    GridBagLayout gbl_MllpCard = new GridBagLayout();
    gbl_MllpCard.columnWidths = new int[] { 150, 0, 0 };
    gbl_MllpCard.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_MllpCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
    gbl_MllpCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    myMllpCard.setLayout(gbl_MllpCard);

    JLabel lblHost = new JLabel("Host");
    GridBagConstraints gbc_lblHost = new GridBagConstraints();
    gbc_lblHost.insets = new Insets(0, 0, 5, 5);
    gbc_lblHost.gridx = 0;
    gbc_lblHost.gridy = 0;
    myMllpCard.add(lblHost, gbc_lblHost);

    mypanel_1 = new JPanel();
    mypanel_1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_1 = new GridBagConstraints();
    gbc_panel_1.insets = new Insets(0, 0, 5, 0);
    gbc_panel_1.fill = GridBagConstraints.BOTH;
    gbc_panel_1.gridx = 1;
    gbc_panel_1.gridy = 0;
    myMllpCard.add(mypanel_1, gbc_panel_1);
    GridBagLayout gbl_panel_1 = new GridBagLayout();
    gbl_panel_1.columnWidths = new int[] { 134, 0 };
    gbl_panel_1.rowHeights = new int[] { 28, 0 };
    gbl_panel_1.columnWeights = new double[] { 1.0, Double.MIN_VALUE };
    gbl_panel_1.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    mypanel_1.setLayout(gbl_panel_1);

    myHostBox = new JTextField();
    GridBagConstraints gbc_HostBox = new GridBagConstraints();
    gbc_HostBox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HostBox.anchor = GridBagConstraints.NORTH;
    gbc_HostBox.gridx = 0;
    gbc_HostBox.gridy = 0;
    mypanel_1.add(myHostBox, gbc_HostBox);
    myHostBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHost(myHostBox.getText());
        }
    });
    myHostBox.setColumns(10);

    JLabel lblTransport = new JLabel("Transport");
    GridBagConstraints gbc_lblTransport = new GridBagConstraints();
    gbc_lblTransport.insets = new Insets(0, 0, 5, 5);
    gbc_lblTransport.gridx = 0;
    gbc_lblTransport.gridy = 1;
    myMllpCard.add(lblTransport, gbc_lblTransport);

    JPanel panel_3 = new JPanel();
    GridBagConstraints gbc_hohAuthPanel = new GridBagConstraints();
    gbc_hohAuthPanel.fill = GridBagConstraints.HORIZONTAL;
    gbc_hohAuthPanel.insets = new Insets(0, 0, 5, 0);
    gbc_hohAuthPanel.gridx = 1;
    gbc_hohAuthPanel.gridy = 1;
    myMllpCard.add(panel_3, gbc_hohAuthPanel);
    panel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gbl_hohAuthPanel = new GridBagLayout();
    gbl_hohAuthPanel.columnWidths = new int[] { 0, 0, 0 };
    gbl_hohAuthPanel.rowHeights = new int[] { 0, 0 };
    gbl_hohAuthPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
    gbl_hohAuthPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel_3.setLayout(gbl_hohAuthPanel);

    myTlsCheckbox = new JCheckBox("Use TLS/SSL");
    myTlsCheckbox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myHohTlsCheckbox.setSelected(myTlsCheckbox.isSelected());
            myConnection.setTls(myTlsCheckbox.isSelected());
        }
    });
    GridBagConstraints gbc_TlsCheckbox = new GridBagConstraints();
    gbc_TlsCheckbox.insets = new Insets(0, 0, 0, 5);
    gbc_TlsCheckbox.anchor = GridBagConstraints.WEST;
    gbc_TlsCheckbox.gridx = 0;
    gbc_TlsCheckbox.gridy = 0;
    panel_3.add(myTlsCheckbox, gbc_TlsCheckbox);

    myHoHCard = new JPanel();
    myInterfaceTypeCardPanel.add(myHoHCard, IFACE_TYPE_CARD_HOH);
    GridBagLayout gbl_HoHCard = new GridBagLayout();
    gbl_HoHCard.columnWidths = new int[] { 150, 0, 0 };
    gbl_HoHCard.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_HoHCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
    gbl_HoHCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    myHoHCard.setLayout(gbl_HoHCard);

    mylabel_6 = new JLabel("Authorization");
    GridBagConstraints gbc_label_6 = new GridBagConstraints();
    gbc_label_6.insets = new Insets(0, 0, 5, 5);
    gbc_label_6.gridx = 0;
    gbc_label_6.gridy = 0;
    myHoHCard.add(mylabel_6, gbc_label_6);

    hohAuthPanel = new JPanel();
    hohAuthPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_hohAuthPanel2 = new GridBagConstraints();
    gbc_hohAuthPanel2.insets = new Insets(0, 0, 5, 0);
    gbc_hohAuthPanel2.fill = GridBagConstraints.BOTH;
    gbc_hohAuthPanel2.gridx = 1;
    gbc_hohAuthPanel2.gridy = 0;
    myHoHCard.add(hohAuthPanel, gbc_hohAuthPanel2);
    GridBagLayout gbl_hohAuthPanel3 = new GridBagLayout();
    gbl_hohAuthPanel3.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0 };
    gbl_hohAuthPanel3.rowHeights = new int[] { 0, 0 };
    gbl_hohAuthPanel3.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE };
    gbl_hohAuthPanel3.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    hohAuthPanel.setLayout(gbl_hohAuthPanel3);

    myHohAuthEnabledCheckbox = new JCheckBox("Enabled");
    myHohAuthEnabledCheckbox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent theE) {
            myConnection.setHohAuthenticationEnabled(myHohAuthEnabledCheckbox.isSelected());
        }
    });
    GridBagConstraints gbc_HohAuthEnabledCheckbox = new GridBagConstraints();
    gbc_HohAuthEnabledCheckbox.insets = new Insets(0, 0, 0, 5);
    gbc_HohAuthEnabledCheckbox.gridx = 0;
    gbc_HohAuthEnabledCheckbox.gridy = 0;
    hohAuthPanel.add(myHohAuthEnabledCheckbox, gbc_HohAuthEnabledCheckbox);

    mylabel_7 = new JLabel("Username:");
    GridBagConstraints gbc_label_7 = new GridBagConstraints();
    gbc_label_7.insets = new Insets(0, 0, 0, 5);
    gbc_label_7.anchor = GridBagConstraints.EAST;
    gbc_label_7.gridx = 1;
    gbc_label_7.gridy = 0;
    hohAuthPanel.add(mylabel_7, gbc_label_7);

    myHohAuthUsernameTextbox = new JTextField();
    myHohAuthUsernameTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohAuthenticationUsername(myHohAuthUsernameTextbox.getText());
        }
    });
    myHohAuthUsernameTextbox.setMaximumSize(new Dimension(200, 2147483647));
    myHohAuthUsernameTextbox.setMinimumSize(new Dimension(100, 28));
    myHohAuthUsernameTextbox.setPreferredSize(new Dimension(100, 28));
    GridBagConstraints gbc_HohUsernameTextbox2 = new GridBagConstraints();
    gbc_HohUsernameTextbox2.insets = new Insets(0, 0, 0, 5);
    gbc_HohUsernameTextbox2.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohUsernameTextbox2.gridx = 2;
    gbc_HohUsernameTextbox2.gridy = 0;
    hohAuthPanel.add(myHohAuthUsernameTextbox, gbc_HohUsernameTextbox2);
    myHohAuthUsernameTextbox.setColumns(10);

    mylabel_8 = new JLabel("Password:");
    GridBagConstraints gbc_label_8 = new GridBagConstraints();
    gbc_label_8.insets = new Insets(0, 0, 0, 5);
    gbc_label_8.anchor = GridBagConstraints.EAST;
    gbc_label_8.gridx = 3;
    gbc_label_8.gridy = 0;
    hohAuthPanel.add(mylabel_8, gbc_label_8);

    myHohAuthPasswordTextbox = new JTextField();
    myHohAuthPasswordTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohAuthenticationPassword(myHohAuthPasswordTextbox.getText());
        }
    });
    myHohAuthPasswordTextbox.setPreferredSize(new Dimension(100, 28));
    myHohAuthPasswordTextbox.setMaximumSize(new Dimension(200, 2147483647));
    myHohAuthPasswordTextbox.setMinimumSize(new Dimension(100, 28));
    GridBagConstraints gbc_HohSignatureKeystoreTextbox = new GridBagConstraints();
    gbc_HohSignatureKeystoreTextbox.insets = new Insets(0, 0, 0, 5);
    gbc_HohSignatureKeystoreTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeystoreTextbox.gridx = 4;
    gbc_HohSignatureKeystoreTextbox.gridy = 0;
    hohAuthPanel.add(myHohAuthPasswordTextbox, gbc_HohSignatureKeystoreTextbox);
    myHohAuthPasswordTextbox.setColumns(10);

    mylabel_2 = new JLabel("Security Profile");
    mylabel_2.setVerticalTextPosition(SwingConstants.TOP);
    mylabel_2.setVerticalAlignment(SwingConstants.TOP);
    GridBagConstraints gbc_label_2 = new GridBagConstraints();
    gbc_label_2.insets = new Insets(0, 0, 5, 5);
    gbc_label_2.gridx = 0;
    gbc_label_2.gridy = 1;
    myHoHCard.add(mylabel_2, gbc_label_2);

    // securityProfilePanel = new JPanel();
    GridBagConstraints gbc_securityProfilePanel = new GridBagConstraints();
    gbc_securityProfilePanel.insets = new Insets(0, 0, 5, 0);
    gbc_securityProfilePanel.fill = GridBagConstraints.BOTH;
    gbc_securityProfilePanel.gridx = 1;
    gbc_securityProfilePanel.gridy = 1;
    // myHoHCard.add(securityProfilePanel, gbc_securityProfilePanel);
    // securityProfilePanel.setLayout(new BorderLayout(0, 0));

    tlsKeystorePanel = new JPanel();
    tlsKeystorePanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    // securityProfilePanel.add(tlsKeystorePanel, BorderLayout.CENTER);
    myHoHCard.add(tlsKeystorePanel, gbc_securityProfilePanel);
    GridBagLayout gbl_tlsKeystorePanel = new GridBagLayout();
    gbl_tlsKeystorePanel.columnWidths = new int[] { 0, 58, 107, 77, 0, 0 };
    gbl_tlsKeystorePanel.rowHeights = new int[] { 28, 16, 0, 0 };
    gbl_tlsKeystorePanel.columnWeights = new double[] { 0.0, 0.0, 1.0, 1.0, 0.0, Double.MIN_VALUE };
    gbl_tlsKeystorePanel.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    tlsKeystorePanel.setLayout(gbl_tlsKeystorePanel);

    myHohTlsCheckbox = new JCheckBox("TLS Enabled");
    GridBagConstraints gbc_HohTlsCheckbox = new GridBagConstraints();
    gbc_HohTlsCheckbox.gridheight = 2;
    gbc_HohTlsCheckbox.insets = new Insets(0, 0, 5, 5);
    gbc_HohTlsCheckbox.gridx = 0;
    gbc_HohTlsCheckbox.gridy = 0;
    tlsKeystorePanel.add(myHohTlsCheckbox, gbc_HohTlsCheckbox);
    myHohTlsCheckbox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myConnection.setTls(myHohTlsCheckbox.isSelected());
            myTlsCheckbox.setSelected(myHohTlsCheckbox.isSelected());
            updatePortsUi();
        }
    });

    mylabel_3 = new JLabel("Keystore:");
    GridBagConstraints gbc_label_3 = new GridBagConstraints();
    gbc_label_3.anchor = GridBagConstraints.WEST;
    gbc_label_3.fill = GridBagConstraints.VERTICAL;
    gbc_label_3.insets = new Insets(0, 0, 5, 5);
    gbc_label_3.gridx = 1;
    gbc_label_3.gridy = 0;
    tlsKeystorePanel.add(mylabel_3, gbc_label_3);

    myHohSecurityKeystoreTextbox = new JTextField();
    GridBagConstraints gbc_HohKeystoreTextbox = new GridBagConstraints();
    gbc_HohKeystoreTextbox.gridwidth = 2;
    gbc_HohKeystoreTextbox.anchor = GridBagConstraints.NORTH;
    gbc_HohKeystoreTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohKeystoreTextbox.insets = new Insets(0, 0, 5, 5);
    gbc_HohKeystoreTextbox.gridx = 2;
    gbc_HohKeystoreTextbox.gridy = 0;
    tlsKeystorePanel.add(myHohSecurityKeystoreTextbox, gbc_HohKeystoreTextbox);
    myHohSecurityKeystoreTextbox.setColumns(10);
    myHohSecurityKeystoreTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = myHohSecurityKeystoreTextbox.getText();
            myHohSecurityKeyPwTextBox.setEnabled(isNotBlank(text));
            myConnection.setTlsKeystoreLocation(text);
        }
    });

    myHohSecurityKeystoreChooseBtn = new JButton("Choose");
    myHohSecurityKeystoreChooseBtn.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            Hl7ConnectionPanel.chooseKeystore(Hl7ConnectionPanel.this, myHohSecurityKeystoreTextbox);
        }
    });
    myHohSecurityKeystoreChooseBtn.setIcon(
            new ImageIcon(Hl7ConnectionPanel.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png")));
    GridBagConstraints gbc_HohSignatureKeystoreChooseButton = new GridBagConstraints();
    gbc_HohSignatureKeystoreChooseButton.insets = new Insets(0, 0, 5, 0);
    gbc_HohSignatureKeystoreChooseButton.gridx = 4;
    gbc_HohSignatureKeystoreChooseButton.gridy = 0;
    tlsKeystorePanel.add(myHohSecurityKeystoreChooseBtn, gbc_HohSignatureKeystoreChooseButton);

    mylabel_4 = new JLabel("Store Pass:");
    GridBagConstraints gbc_label_4 = new GridBagConstraints();
    gbc_label_4.insets = new Insets(0, 0, 0, 5);
    gbc_label_4.anchor = GridBagConstraints.EAST;
    gbc_label_4.gridx = 1;
    gbc_label_4.gridy = 1;
    tlsKeystorePanel.add(mylabel_4, gbc_label_4);

    myHohSecurityKeyPwTextBox = new JTextField();
    myHohSecurityKeyPwTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setTlsKeystorePassword(myHohSecurityKeyPwTextBox.getText());
        }
    });
    GridBagConstraints gbc_HohSecurityKeyPwTextBox = new GridBagConstraints();
    gbc_HohSecurityKeyPwTextBox.insets = new Insets(0, 0, 0, 5);
    gbc_HohSecurityKeyPwTextBox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSecurityKeyPwTextBox.gridx = 2;
    gbc_HohSecurityKeyPwTextBox.gridy = 1;
    tlsKeystorePanel.add(myHohSecurityKeyPwTextBox, gbc_HohSecurityKeyPwTextBox);
    myHohSecurityKeyPwTextBox.setColumns(10);

    myHohSecurityProfileKeystoreStatus = new JLabel("Value goes here");
    myHohSecurityProfileKeystoreStatus.setHorizontalAlignment(SwingConstants.CENTER);
    GridBagConstraints gbc_HohSecurityProfileKeystoreStatus = new GridBagConstraints();
    gbc_HohSecurityProfileKeystoreStatus.anchor = GridBagConstraints.NORTH;
    gbc_HohSecurityProfileKeystoreStatus.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSecurityProfileKeystoreStatus.gridwidth = 5;
    gbc_HohSecurityProfileKeystoreStatus.gridx = 0;
    gbc_HohSecurityProfileKeystoreStatus.gridy = 2;
    tlsKeystorePanel.add(myHohSecurityProfileKeystoreStatus, gbc_HohSecurityProfileKeystoreStatus);

    mylabel_9 = new JLabel("Signature Profile");
    GridBagConstraints gbc_label_9 = new GridBagConstraints();
    gbc_label_9.insets = new Insets(0, 0, 0, 5);
    gbc_label_9.gridx = 0;
    gbc_label_9.gridy = 2;
    myHoHCard.add(mylabel_9, gbc_label_9);

    mypanel_3 = new JPanel();
    mypanel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_3 = new GridBagConstraints();
    gbc_panel_3.fill = GridBagConstraints.BOTH;
    gbc_panel_3.gridx = 1;
    gbc_panel_3.gridy = 2;
    myHoHCard.add(mypanel_3, gbc_panel_3);
    GridBagLayout gbl_panel_3 = new GridBagLayout();
    gbl_panel_3.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 50, 0, 0 };
    gbl_panel_3.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_panel_3.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
    gbl_panel_3.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    mypanel_3.setLayout(gbl_panel_3);

    myHohSignatureEnabled = new JCheckBox("Enabled");
    myHohSignatureEnabled.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent theE) {
            myConnection.setHohSignatureEnabled(myHohSignatureEnabled.isSelected());
        }
    });
    GridBagConstraints gbc_HohSignatureEnabled = new GridBagConstraints();
    gbc_HohSignatureEnabled.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureEnabled.gridx = 0;
    gbc_HohSignatureEnabled.gridy = 0;
    mypanel_3.add(myHohSignatureEnabled, gbc_HohSignatureEnabled);

    mylabel_10 = new JLabel("Keystore:");
    GridBagConstraints gbc_label_10 = new GridBagConstraints();
    gbc_label_10.anchor = GridBagConstraints.EAST;
    gbc_label_10.insets = new Insets(0, 0, 5, 5);
    gbc_label_10.gridx = 1;
    gbc_label_10.gridy = 0;
    mypanel_3.add(mylabel_10, gbc_label_10);

    myHohSignatureKeystoreTextbox = new JTextField();
    myHohSignatureKeystoreTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohSignatureKeystore(myHohSignatureKeystoreTextbox.getText());
        }
    });
    GridBagConstraints gbc_HohSignatureKeystoreTextbox2 = new GridBagConstraints();
    gbc_HohSignatureKeystoreTextbox2.gridwidth = 5;
    gbc_HohSignatureKeystoreTextbox2.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureKeystoreTextbox2.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeystoreTextbox2.gridx = 2;
    gbc_HohSignatureKeystoreTextbox2.gridy = 0;
    mypanel_3.add(myHohSignatureKeystoreTextbox, gbc_HohSignatureKeystoreTextbox2);
    myHohSignatureKeystoreTextbox.setColumns(10);

    myHohSignatureKeystoreChooseButton = new JButton("Choose");
    myHohSignatureKeystoreChooseButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            Hl7ConnectionPanel.chooseKeystore(Hl7ConnectionPanel.this, myHohSignatureKeystoreTextbox);
        }
    });
    myHohSignatureKeystoreChooseButton.setIcon(
            new ImageIcon(Hl7ConnectionPanel.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png")));
    GridBagConstraints gbc_HohSignatureKeystoreChooseButton2 = new GridBagConstraints();
    gbc_HohSignatureKeystoreChooseButton2.insets = new Insets(0, 0, 5, 0);
    gbc_HohSignatureKeystoreChooseButton2.gridx = 7;
    gbc_HohSignatureKeystoreChooseButton2.gridy = 0;
    mypanel_3.add(myHohSignatureKeystoreChooseButton, gbc_HohSignatureKeystoreChooseButton2);

    mylabel_11 = new JLabel("Store Pass:");
    GridBagConstraints gbc_label_11 = new GridBagConstraints();
    gbc_label_11.anchor = GridBagConstraints.EAST;
    gbc_label_11.insets = new Insets(0, 0, 5, 5);
    gbc_label_11.gridx = 1;
    gbc_label_11.gridy = 1;
    mypanel_3.add(mylabel_11, gbc_label_11);

    myHohSignatureKeystorePasswordTextbox = new JTextField();
    myHohSignatureKeystorePasswordTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohSignatureKeystorePassword(myHohSignatureKeystorePasswordTextbox.getText());
        }
    });
    myHohSignatureKeystorePasswordTextbox.setPreferredSize(new Dimension(100, 28));
    myHohSignatureKeystorePasswordTextbox.setMinimumSize(new Dimension(100, 28));
    myHohSignatureKeystorePasswordTextbox.setMaximumSize(new Dimension(200, 2147483647));
    GridBagConstraints gbc_HohSignatureKeystorePasswordTextbox = new GridBagConstraints();
    gbc_HohSignatureKeystorePasswordTextbox.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureKeystorePasswordTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeystorePasswordTextbox.gridx = 2;
    gbc_HohSignatureKeystorePasswordTextbox.gridy = 1;
    mypanel_3.add(myHohSignatureKeystorePasswordTextbox, gbc_HohSignatureKeystorePasswordTextbox);
    myHohSignatureKeystorePasswordTextbox.setColumns(10);

    mylabel_12 = new JLabel("Key:");
    GridBagConstraints gbc_label_12 = new GridBagConstraints();
    gbc_label_12.anchor = GridBagConstraints.EAST;
    gbc_label_12.insets = new Insets(0, 0, 5, 5);
    gbc_label_12.gridx = 3;
    gbc_label_12.gridy = 1;
    mypanel_3.add(mylabel_12, gbc_label_12);

    myHohSignatureKeyAliasCombo = new JComboBox();
    myHohSignatureKeyAliasCombo.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent theE) {
            if (myUpdatingHohSignatureKeyAliasCombo) {
                return;
            }
            String selection = (String) myHohSignatureKeyAliasCombo.getSelectedItem();
            if (selection == HOH_SIGNATURE_KEY_USE_ANY_AVAILABLE) {
                myConnection.setHohSignatureKey(null);
            } else {
                myConnection.setHohSignatureKey(selection.replaceAll(" .*", ""));
            }
        }
    });
    GridBagConstraints gbc_HohSignatureKeyAliasCombo = new GridBagConstraints();
    gbc_HohSignatureKeyAliasCombo.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureKeyAliasCombo.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeyAliasCombo.gridx = 4;
    gbc_HohSignatureKeyAliasCombo.gridy = 1;
    mypanel_3.add(myHohSignatureKeyAliasCombo, gbc_HohSignatureKeyAliasCombo);

    mylabel_13 = new JLabel("Key Pass:");
    GridBagConstraints gbc_label_13 = new GridBagConstraints();
    gbc_label_13.anchor = GridBagConstraints.EAST;
    gbc_label_13.insets = new Insets(0, 0, 5, 5);
    gbc_label_13.gridx = 5;
    gbc_label_13.gridy = 1;
    mypanel_3.add(mylabel_13, gbc_label_13);

    myHohSignatureKeyPass = new JTextField();
    myHohSignatureKeyPass.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohSignatureKeyPassword(myHohSignatureKeyPass.getText());
        }
    });
    myHohSignatureKeyPass.setMinimumSize(new Dimension(50, 28));
    myHohSignatureKeyPass.setMaximumSize(new Dimension(50, 2147483647));
    myHohSignatureKeyPass.setPreferredSize(new Dimension(50, 28));
    GridBagConstraints gbc_HohSignatureKeyPass = new GridBagConstraints();
    gbc_HohSignatureKeyPass.gridwidth = 2;
    gbc_HohSignatureKeyPass.insets = new Insets(0, 0, 5, 0);
    gbc_HohSignatureKeyPass.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeyPass.gridx = 6;
    gbc_HohSignatureKeyPass.gridy = 1;
    mypanel_3.add(myHohSignatureKeyPass, gbc_HohSignatureKeyPass);
    myHohSignatureKeyPass.setColumns(10);

    myHohSignatureStatusLabel = new JLabel("New label");
    myHohSignatureStatusLabel.setHorizontalAlignment(SwingConstants.CENTER);
    GridBagConstraints gbc_HohSignatureStatusLabel = new GridBagConstraints();
    gbc_HohSignatureStatusLabel.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureStatusLabel.gridwidth = 8;
    gbc_HohSignatureStatusLabel.insets = new Insets(0, 0, 0, 5);
    gbc_HohSignatureStatusLabel.gridx = 0;
    gbc_HohSignatureStatusLabel.gridy = 2;
    mypanel_3.add(myHohSignatureStatusLabel, gbc_HohSignatureStatusLabel);

    init();

}

From source file:net.sf.taverna.t2.activities.spreadsheet.views.SpreadsheetImportConfigView.java

/**
 * Adds a light gray or etched border to the top or bottom of a JComponent.
 *
 * @param component//from ww w  . j av  a 2  s .  c  o  m
 */
protected void addDivider(JComponent component, final int position, final boolean etched) {
    component.setBorder(new Border() {
        private final Color borderColor = new Color(.6f, .6f, .6f);

        public Insets getBorderInsets(Component c) {
            if (position == SwingConstants.TOP) {
                return new Insets(5, 0, 0, 0);
            } else {
                return new Insets(0, 0, 5, 0);
            }
        }

        public boolean isBorderOpaque() {
            return false;
        }

        public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
            if (position == SwingConstants.TOP) {
                if (etched) {
                    g.setColor(borderColor);
                    g.drawLine(x, y, x + width, y);
                    g.setColor(Color.WHITE);
                    g.drawLine(x, y + 1, x + width, y + 1);
                } else {
                    g.setColor(Color.LIGHT_GRAY);
                    g.drawLine(x, y, x + width, y);
                }
            } else {
                if (etched) {
                    g.setColor(borderColor);
                    g.drawLine(x, y + height - 2, x + width, y + height - 2);
                    g.setColor(Color.WHITE);
                    g.drawLine(x, y + height - 1, x + width, y + height - 1);
                } else {
                    g.setColor(Color.LIGHT_GRAY);
                    g.drawLine(x, y + height - 1, x + width, y + height - 1);
                }
            }
        }

    });
}