Example usage for javax.swing BorderFactory createEmptyBorder

List of usage examples for javax.swing BorderFactory createEmptyBorder

Introduction

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

Prototype

public static Border createEmptyBorder(int top, int left, int bottom, int right) 

Source Link

Document

Creates an empty border that takes up space but which does no drawing, specifying the width of the top, left, bottom, and right sides.

Usage

From source file:edu.ku.brc.specify.ui.treetables.TreeDefinitionEditor.java

/**
* @param isEditMode whether to enable editing.
*//*from   w w  w. j  a  v a  2  s . com*/
protected void initUI() {
    this.setLayout(new BorderLayout());

    Dimension horizSpacer = new Dimension(5, 0);

    statusBar = UIRegistry.getStatusBar();

    // create north panel
    titlePanel = new JPanel();
    titlePanel.setLayout(new BoxLayout(titlePanel, BoxLayout.LINE_AXIS));

    defNameLabel = createLabel(""); //$NON-NLS-1$

    titlePanel.add(Box.createHorizontalGlue());
    titlePanel.add(defNameLabel);
    titlePanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0));

    if (isEditMode) {
        //editDefButton = createButton(editIcon);
        editDefButton = UIHelper.createIconBtn("EditIcon", "TTV_EDIT_TREDEF_TITLE", new ActionListener() //$NON-NLS-1$ //$NON-NLS-2$
        {
            public void actionPerformed(ActionEvent ae) {
                showDefEditDialog(displayedDef);
            }
        });
        editDefButton.setEnabled(true);

        // add north panel widgets
        titlePanel.add(Box.createRigidArea(horizSpacer));
        titlePanel.add(editDefButton);

    } else {
        editDefButton = null;
    }
    titlePanel.add(Box.createHorizontalGlue());

    if (isEditMode) {
        // create south panel
        ActionListener deleteAction = new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                deleteItem(defItemsTable.getSelectedRow());
            }
        };
        ActionListener newItemAction = new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                newItem(defItemsTable.getSelectedRow());
            }
        };

        ActionListener editItemAction = new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                editTreeDefItem(defItemsTable.getSelectedRow());
            }
        };

        edaPanel = new EditDeleteAddPanel(editItemAction, deleteAction, newItemAction, "TTV_EDIT_TDI", //$NON-NLS-1$
                "TTV_DEL_TDI", "TTV_NEW_TDI"); //$NON-NLS-1$ //$NON-NLS-2$
    }
}

From source file:net.sf.jabref.gui.openoffice.StyleSelectDialog.java

private void init() {
    setupPopupMenu();//from w  w  w  . j av a  2 s  .  c o  m

    addButton.addActionListener(actionEvent -> {
        AddFileDialog addDialog = new AddFileDialog();
        addDialog.setDirectoryPath(preferences.getCurrentStyle());
        addDialog.setVisible(true);
        addDialog.getFileName().ifPresent(fileName -> {
            if (loader.addStyleIfValid(fileName)) {
                preferences.setCurrentStyle(fileName);
            }
        });
        updateStyles();

    });
    addButton.setToolTipText(Localization.lang("Add style file"));

    removeButton.addActionListener(removeAction);
    removeButton.setToolTipText(Localization.lang("Remove style"));

    // Create a preview panel for previewing styles
    // Must be done before creating the table to avoid NPEs
    preview = new PreviewPanel(null, null, "");
    // Use the test entry from the Preview settings tab in Preferences:
    preview.setEntry(prevEntry);

    setupTable();
    updateStyles();

    // Build dialog
    diag = new JDialog(frame, Localization.lang("Select style"), true);

    FormBuilder builder = FormBuilder.create();
    builder.layout(new FormLayout("fill:pref:grow, 4dlu, left:pref, 4dlu, left:pref",
            "pref, 4dlu, 100dlu:grow, 4dlu, pref, 4dlu, fill:100dlu"));
    builder.add(Localization.lang("Select one of the available styles or add a style file from disk.")).xyw(1,
            1, 5);
    builder.add(new JScrollPane(table)).xyw(1, 3, 5);
    builder.add(addButton).xy(3, 5);
    builder.add(removeButton).xy(5, 5);
    builder.add(preview).xyw(1, 7, 5);
    builder.padding("5dlu, 5dlu, 5dlu, 5dlu");

    diag.add(builder.getPanel(), BorderLayout.CENTER);

    AbstractAction okListener = new AbstractAction() {

        @Override
        public void actionPerformed(ActionEvent event) {
            if ((table.getRowCount() == 0) || (table.getSelectedRowCount() == 0)) {
                JOptionPane.showMessageDialog(diag, Localization.lang("You must select a valid style file."),
                        Localization.lang("Style selection"), JOptionPane.ERROR_MESSAGE);
                return;
            }
            okPressed = true;
            storeSettings();
            diag.dispose();
        }
    };
    ok.addActionListener(okListener);

    Action cancelListener = new AbstractAction() {

        @Override
        public void actionPerformed(ActionEvent event) {
            diag.dispose();
        }
    };
    cancel.addActionListener(cancelListener);

    ButtonBarBuilder bb = new ButtonBarBuilder();
    bb.addGlue();
    bb.addButton(ok);
    bb.addButton(cancel);
    bb.addGlue();
    bb.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    diag.add(bb.getPanel(), BorderLayout.SOUTH);

    ActionMap am = bb.getPanel().getActionMap();
    InputMap im = bb.getPanel().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
    im.put(Globals.getKeyPrefs().getKey(KeyBinding.CLOSE_DIALOG), "close");
    am.put("close", cancelListener);
    im.put(KeyStroke.getKeyStroke("ENTER"), "enterOk");
    am.put("enterOk", okListener);

    diag.pack();

    PositionWindow pw = new PositionWindow(diag, JabRefPreferences.STYLES_POS_X, JabRefPreferences.STYLES_POS_Y,
            JabRefPreferences.STYLES_SIZE_X, JabRefPreferences.STYLES_SIZE_Y);
    pw.setWindowPosition();
}

From source file:org.obiba.onyx.jade.instrument.summitdoppler.VantageABIInstrumentRunner.java

/**
 * Build action buttons sub panel/* w  w  w  .  j a v  a2  s  .  c  om*/
 */
protected JPanel buildActionButtonSubPanel() {

    // Add the action buttons sub panel.
    JPanel panel = new JPanel();
    panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

    JButton cancelButton = new JButton(resourceBundle.getString("Cancel"));
    cancelButton.setMnemonic('A');
    cancelButton.setToolTipText(resourceBundle.getString("ToolTip.Cancel_measurement"));
    panel.add(Box.createHorizontalGlue());
    panel.add(saveButton);
    panel.add(Box.createRigidArea(new Dimension(10, 0)));
    panel.add(cancelButton);

    // Save button listener.
    saveButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            sendOutputToServer();
        }
    });

    // Cancel button listener.
    cancelButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            confirmOnExit();
        }
    });

    panel.setAlignmentX(Component.LEFT_ALIGNMENT);

    return (panel);
}

From source file:org.jdal.swing.form.FormUtils.java

/**
 * Creates empty border//from w w  w  .  ja v  a  2s  .  co m
 * @param size border size
 * @return empty border
 */
public static Border createEmptyBorder(int size) {
    return BorderFactory.createEmptyBorder(size, size, size, size);
}

From source file:net.sf.jabref.wizard.auximport.gui.FromAuxDialog.java

private void initPanels() {
    // collect the names of all open databases
    int len = parentTabbedPane.getTabCount();
    int toSelect = -1;
    for (int i = 0; i < len; i++) {
        dbChooser.addItem(parentTabbedPane.getTitleAt(i));
        if (parent.getBasePanelAt(i) == parent.getCurrentBasePanel()) {
            toSelect = i;//w w w.jav a  2s  .  co  m
        }
    }
    if (toSelect >= 0) {
        dbChooser.setSelectedIndex(toSelect);
    }

    auxFileField = new JTextField("", 25);
    JButton browseAuxFileButton = new JButton(Localization.lang("Browse"));
    browseAuxFileButton.addActionListener(new BrowseAction(auxFileField, parent));
    notFoundList = new JList<>();
    JScrollPane listScrollPane = new JScrollPane(notFoundList);
    //listScrollPane.setPreferredSize(new Dimension(250, 120));
    statusInfos = new JTextArea("", 5, 20);
    JScrollPane statusScrollPane = new JScrollPane(statusInfos);
    //statusScrollPane.setPreferredSize(new Dimension(250, 120));
    //statusInfos.setBorder(BorderFactory.createEtchedBorder());
    statusInfos.setEditable(false);

    DefaultFormBuilder b = new DefaultFormBuilder(
            new FormLayout("left:pref, 4dlu, fill:pref:grow, 4dlu, left:pref", ""), buttons);
    b.appendSeparator(Localization.lang("Options"));
    b.append(Localization.lang("Reference database") + ":");
    b.append(dbChooser, 3);
    b.nextLine();
    b.append(Localization.lang("LaTeX AUX file") + ":");
    b.append(auxFileField);
    b.append(browseAuxFileButton);
    b.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

    b = new DefaultFormBuilder(
            new FormLayout("fill:pref:grow, 4dlu, fill:pref:grow", "pref, pref, fill:pref:grow"), statusPanel);
    b.appendSeparator(Localization.lang("Result"));
    b.append(Localization.lang("Unknown bibtex entries") + ":");
    b.append(Localization.lang("Messages") + ":");
    b.nextLine();
    b.append(listScrollPane);
    b.append(statusScrollPane);
    b.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
}

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.//  w ww. j a  v a 2s  . co 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:diet.gridr.g5k.gui.ClusterInfoPanel.java

/**
 * This method initializes jPanel//from  ww  w. ja v a 2  s . c  o  m
 *
 * @return javax.swing.JPanel
 */
private JPanel getJPanel() {
    if (jPanel == null) {
        jPanel = new JPanel();
        jPanel.setLayout(new BoxLayout(jPanel, BoxLayout.Y_AXIS));
        jPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        jPanel.add(getSelectionChartPanel());
        jPanel.add(Box.createVerticalStrut(10));
        jPanel.add(getCardPanel());
        jPanel.add(new JSeparator(JSeparator.HORIZONTAL));
    }
    return jPanel;
}

From source file:net.java.sip.communicator.impl.gui.main.chat.ChatWritePanel.java

/**
 * Creates the center panel.//  ww  w  .  ja va  2 s. c  o m
 *
 * @return the created center panel
 */
private Container createCenter() {
    JPanel centerPanel = new JPanel(new GridBagLayout());

    centerPanel.setBackground(Color.WHITE);
    centerPanel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 3));

    GridBagConstraints constraints = new GridBagConstraints();

    initSmsLabel(centerPanel);
    initTextArea(centerPanel);

    smsCharCountLabel = new JLabel(String.valueOf(smsCharCount));
    smsCharCountLabel.setForeground(Color.GRAY);
    smsCharCountLabel.setVisible(false);

    constraints.anchor = GridBagConstraints.NORTHEAST;
    constraints.fill = GridBagConstraints.NONE;
    constraints.gridx = 3;
    constraints.gridy = 0;
    constraints.weightx = 0f;
    constraints.weighty = 0f;
    constraints.insets = new Insets(0, 2, 0, 2);
    constraints.gridheight = 1;
    constraints.gridwidth = 1;
    centerPanel.add(smsCharCountLabel, constraints);

    smsNumberLabel = new JLabel(String.valueOf(smsNumberCount)) {
        @Override
        public void paintComponent(Graphics g) {
            AntialiasingManager.activateAntialiasing(g);
            g.setColor(getBackground());
            g.fillOval(0, 0, getWidth(), getHeight());

            super.paintComponent(g);
        }
    };
    smsNumberLabel.setHorizontalAlignment(JLabel.CENTER);
    smsNumberLabel.setPreferredSize(new Dimension(18, 18));
    smsNumberLabel.setMinimumSize(new Dimension(18, 18));
    smsNumberLabel.setForeground(Color.WHITE);
    smsNumberLabel.setBackground(Color.GRAY);
    smsNumberLabel.setVisible(false);

    constraints.anchor = GridBagConstraints.NORTHEAST;
    constraints.fill = GridBagConstraints.NONE;
    constraints.gridx = 4;
    constraints.gridy = 0;
    constraints.weightx = 0f;
    constraints.weighty = 0f;
    constraints.insets = new Insets(0, 2, 0, 2);
    constraints.gridheight = 1;
    constraints.gridwidth = 1;
    centerPanel.add(smsNumberLabel, constraints);

    return centerPanel;
}

From source file:net.java.sip.communicator.gui.AuthenticationSplash.java

/**
 *
 * We use dynamic layout managers, so that layout is dynamic and will
 * adapt properly to user-customized fonts and localized text. The
 * GridBagLayout makes it easy to line up components of varying
 * sizes along invisible vertical and horizontal grid lines. It
 * is important to sketch the layout of the interface and decide
 * on the grid before writing the layout code.
 *
 * Here we actually use/*from ww  w. j a  va 2 s. c  o m*/
 * our own subclass of GridBagLayout called StringGridBagLayout,
 * which allows us to use strings to specify constraints, rather
 * than having to create GridBagConstraints objects manually.
 *
 *
 * We use the JLabel.setLabelFor() method to connect
 * labels to what they are labeling. This allows mnemonics to work
 * and assistive to technologies used by persons with disabilities
 * to provide much more useful information to the user.
 */

private void initComponents(final Frame parent) {
    Container contents = getContentPane();
    contents.setLayout(new BorderLayout());

    String title = Utils.getProperty("net.java.sip.communicator.gui.AUTH_WIN_TITLE");

    if (title == null)
        title = "Login Manager";

    setTitle(title);
    setResizable(false);
    addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent event) {
            dialogDone(CMD_CANCEL, parent);
        }
    });

    // Accessibility -- all frames, dialogs, and applets should
    // have a description
    getAccessibleContext().setAccessibleDescription("Authentication Splash");

    String authPromptLabelValue = Utils.getProperty("net.java.sip.communicator.gui.AUTHENTICATION_PROMPT");

    if (authPromptLabelValue == null)
        authPromptLabelValue = "Please register to the service or enter your credentials to log in:";

    JLabel splashLabel = new JLabel(authPromptLabelValue);
    splashLabel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    splashLabel.setHorizontalAlignment(SwingConstants.CENTER);
    splashLabel.setHorizontalTextPosition(SwingConstants.CENTER);
    contents.add(splashLabel, BorderLayout.NORTH);

    JPanel centerPane = new JPanel();
    centerPane.setLayout(new GridBagLayout());

    userNameTextField = new JTextField(); // needed below

    // user name label
    JLabel userNameLabel = new JLabel();
    userNameLabel.setDisplayedMnemonic('U');
    // setLabelFor() allows the mnemonic to work
    userNameLabel.setLabelFor(userNameTextField);

    String userNameLabelValue = Utils.getProperty("net.java.sip.communicator.gui.USER_NAME_LABEL");

    if (userNameLabelValue == null)
        userNameLabelValue = "Username";

    int gridy = 0;

    userNameLabel.setText(userNameLabelValue);
    GridBagConstraints c = new GridBagConstraints();
    c.gridx = 0;
    c.gridy = gridy;
    c.anchor = GridBagConstraints.WEST;
    c.insets = new Insets(12, 12, 0, 0);
    centerPane.add(userNameLabel, c);

    // user name text
    c = new GridBagConstraints();
    c.gridx = 1;
    c.gridy = gridy++;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.weightx = 1.0;
    c.insets = new Insets(12, 7, 0, 11);
    centerPane.add(userNameTextField, c);

    passwordTextField = new JPasswordField(); //needed below

    // password label
    JLabel passwordLabel = new JLabel();
    passwordLabel.setDisplayedMnemonic('P');
    passwordLabel.setLabelFor(passwordTextField);
    String pLabelStr = PropertiesDepot.getProperty("net.java.sip.communicator.gui.PASSWORD_LABEL");

    if (pLabelStr == null)
        pLabelStr = "Password";

    passwordLabel.setText(pLabelStr);
    c = new GridBagConstraints();
    c.gridx = 0;
    c.gridy = gridy;
    c.anchor = GridBagConstraints.WEST;
    c.insets = new Insets(11, 12, 0, 0);

    centerPane.add(passwordLabel, c);

    // password text
    passwordTextField.setEchoChar('\u2022');
    c = new GridBagConstraints();
    c.gridx = 1;
    c.gridy = gridy++;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.weightx = 1.0;
    c.insets = new Insets(11, 7, 0, 11);
    centerPane.add(passwordTextField, c);

    //Set a relevant realm value
    //Bug report by Steven Lass (sltemp at comcast.net)
    //JLabel realmValueLabel = new JLabel("SipPhone.com"); // needed below

    // realm label

    JLabel realmLabel = new JLabel();
    realmLabel.setDisplayedMnemonic('R');
    realmLabel.setLabelFor(realmValueLabel);
    realmLabel.setText("Realm");
    realmValueLabel = new JLabel();

    // Buttons along bottom of window
    JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new BoxLayout(buttonPanel, 0));
    loginButton = new JButton();
    loginButton.setText("Login");
    loginButton.setActionCommand(CMD_LOGIN);
    loginButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            dialogDone(event, parent);
        }
    });
    buttonPanel.add(loginButton);

    // space
    buttonPanel.add(Box.createRigidArea(new Dimension(5, 0)));

    registerButton = new JButton();
    registerButton.setMnemonic('G');
    registerButton.setText("Register");
    registerButton.setActionCommand(CMD_REGISTER);
    registerButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            dialogDone(event, parent);
        }
    });
    buttonPanel.add(registerButton);

    buttonPanel.add(Box.createRigidArea(new Dimension(5, 0)));

    cancelButton = new JButton();
    cancelButton.setText("Cancel");
    cancelButton.setActionCommand(CMD_CANCEL);
    cancelButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            dialogDone(event, parent);
        }
    });
    buttonPanel.add(cancelButton);

    c = new GridBagConstraints();
    c.gridx = 0;
    c.gridy = 3;
    c.gridwidth = 2;
    c.insets = new Insets(11, 12, 11, 11);

    centerPane.add(buttonPanel, c);

    contents.add(centerPane, BorderLayout.CENTER);
    getRootPane().setDefaultButton(loginButton);
    equalizeButtonSizes();

    setFocusTraversalPolicy(new FocusTraversalPol());

}

From source file:client.ui.FilePane.java

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

    fileButtonPane = new JPanel();
    uploadFileButton = new JButton();
    downloadFileButton = new JButton();
    deleteFileButton = new JButton();
    renameFileButton = new JButton();
    authorizationButton = new JButton();
    jSeparator1 = new JSeparator();
    addNoteButton = new JButton();
    deleteNoteButton = new JButton();
    jSeparator2 = new JSeparator();
    targetIDField = new JTextField();
    searchUserButton = new JButton();
    returnButton = new JButton();
    jSeparator3 = new JSeparator();
    refreshButton = new JButton();
    jSeparator4 = new JSeparator();
    changePasswdButton = new JButton();
    fileSplitPane = new JSplitPane();
    jSplitPane2 = new JSplitPane();
    fileInfoScroll = new JScrollPane();
    fileInfoTable = new JTable();
    noteDisplayScroll = new JScrollPane();
    noteTable = new JTable();
    jSplitPane1 = new JSplitPane();
    fileDisplayScroll = new JScrollPane();
    fileContentArea = new JTextArea();
    noteInputScroll = new JScrollPane();
    noteInputArea = new JTextArea();

    FormListener formListener = new FormListener();

    setForeground(new Color(240, 240, 240));
    setFont(new Font("", 0, 12)); // NOI18N
    setMaximumSize(new Dimension(1366, 768));
    setPreferredSize(new Dimension(1366, 700));

    fileButtonPane.setMaximumSize(new Dimension(32767, 50));
    fileButtonPane.setMinimumSize(new Dimension(404, 50));

    uploadFileButton.setFont(new Font("", 0, 12)); // NOI18N
    uploadFileButton.setText("");
    uploadFileButton.setActionCommand("JButton1");
    uploadFileButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    uploadFileButton.setBorderPainted(false);
    uploadFileButton.setContentAreaFilled(false);
    uploadFileButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    uploadFileButton.setFocusPainted(false);
    uploadFileButton.setMaximumSize(new Dimension(30, 20));
    uploadFileButton.setMinimumSize(new Dimension(30, 20));
    uploadFileButton.addMouseListener(formListener);
    uploadFileButton.addActionListener(formListener);

    downloadFileButton.setFont(new Font("", 0, 12)); // NOI18N
    downloadFileButton.setText("");
    downloadFileButton.setActionCommand("JButton1");
    downloadFileButton.setBorder(null);
    downloadFileButton.setBorderPainted(false);
    downloadFileButton.setContentAreaFilled(false);
    downloadFileButton.setEnabled(false);
    downloadFileButton.setFocusPainted(false);
    downloadFileButton.setMaximumSize(new Dimension(30, 20));
    downloadFileButton.setMinimumSize(new Dimension(30, 20));
    downloadFileButton.setPreferredSize(new Dimension(30, 20));
    downloadFileButton.addMouseListener(formListener);
    downloadFileButton.addActionListener(formListener);

    deleteFileButton.setFont(new Font("", 0, 12)); // NOI18N
    deleteFileButton.setText("");
    deleteFileButton.setBorder(null);
    deleteFileButton.setBorderPainted(false);
    deleteFileButton.setContentAreaFilled(false);
    deleteFileButton.setEnabled(false);
    deleteFileButton.setFocusPainted(false);
    deleteFileButton.addMouseListener(formListener);
    deleteFileButton.addActionListener(formListener);

    renameFileButton.setFont(new Font("", 0, 12)); // NOI18N
    renameFileButton.setText("???");
    renameFileButton.setBorder(null);
    renameFileButton.setBorderPainted(false);
    renameFileButton.setContentAreaFilled(false);
    renameFileButton.setEnabled(false);
    renameFileButton.setFocusPainted(false);
    renameFileButton.addMouseListener(formListener);
    renameFileButton.addActionListener(formListener);

    authorizationButton.setFont(new Font("", 0, 12)); // NOI18N
    authorizationButton.setText("??");
    authorizationButton.setBorder(null);
    authorizationButton.setBorderPainted(false);
    authorizationButton.setContentAreaFilled(false);
    authorizationButton.setEnabled(false);
    authorizationButton.setFocusPainted(false);
    authorizationButton.addMouseListener(formListener);
    authorizationButton.addActionListener(formListener);

    jSeparator1.setOrientation(SwingConstants.VERTICAL);

    addNoteButton.setFont(new Font("", 0, 12)); // NOI18N
    addNoteButton.setText("");
    addNoteButton.setActionCommand("JButton1");
    addNoteButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    addNoteButton.setBorderPainted(false);
    addNoteButton.setContentAreaFilled(false);
    addNoteButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    addNoteButton.setEnabled(false);
    addNoteButton.setFocusPainted(false);
    addNoteButton.setMaximumSize(new Dimension(30, 20));
    addNoteButton.setMinimumSize(new Dimension(30, 20));
    addNoteButton.addMouseListener(formListener);
    addNoteButton.addActionListener(formListener);

    deleteNoteButton.setFont(new Font("", 0, 12)); // NOI18N
    deleteNoteButton.setText("");
    deleteNoteButton.setActionCommand("JButton1");
    deleteNoteButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    deleteNoteButton.setBorderPainted(false);
    deleteNoteButton.setContentAreaFilled(false);
    deleteNoteButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    deleteNoteButton.setEnabled(false);
    deleteNoteButton.setFocusPainted(false);
    deleteNoteButton.setMaximumSize(new Dimension(30, 20));
    deleteNoteButton.setMinimumSize(new Dimension(30, 20));
    deleteNoteButton.addMouseListener(formListener);
    deleteNoteButton.addActionListener(formListener);

    jSeparator2.setOrientation(SwingConstants.VERTICAL);

    targetIDField.setFont(new Font("", 0, 12)); // NOI18N

    searchUserButton.setFont(new Font("", 0, 12)); // NOI18N
    searchUserButton.setText("");
    searchUserButton.setActionCommand("JButton1");
    searchUserButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    searchUserButton.setBorderPainted(false);
    searchUserButton.setContentAreaFilled(false);
    searchUserButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    searchUserButton.setFocusPainted(false);
    searchUserButton.setMaximumSize(new Dimension(30, 20));
    searchUserButton.setMinimumSize(new Dimension(30, 20));
    searchUserButton.addMouseListener(formListener);
    searchUserButton.addActionListener(formListener);

    returnButton.setFont(new Font("", 0, 12)); // NOI18N
    returnButton.setText("");
    returnButton.setActionCommand("JButton1");
    returnButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    returnButton.setBorderPainted(false);
    returnButton.setContentAreaFilled(false);
    returnButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    returnButton.setFocusPainted(false);
    returnButton.setMaximumSize(new Dimension(30, 20));
    returnButton.setMinimumSize(new Dimension(30, 20));
    returnButton.addMouseListener(formListener);
    returnButton.addActionListener(formListener);

    jSeparator3.setOrientation(SwingConstants.VERTICAL);

    refreshButton.setFont(new Font("", 0, 12)); // NOI18N
    refreshButton.setText("");
    refreshButton.setActionCommand("JButton1");
    refreshButton.setBorder(null);
    refreshButton.setBorderPainted(false);
    refreshButton.setContentAreaFilled(false);
    refreshButton.setFocusPainted(false);
    refreshButton.setMaximumSize(new Dimension(30, 20));
    refreshButton.setMinimumSize(new Dimension(30, 20));
    refreshButton.setPreferredSize(new Dimension(30, 20));
    refreshButton.addMouseListener(formListener);
    refreshButton.addActionListener(formListener);

    jSeparator4.setOrientation(SwingConstants.VERTICAL);

    changePasswdButton.setFont(new Font("", 0, 12)); // NOI18N
    changePasswdButton.setText("?");
    changePasswdButton.setActionCommand("JButton1");
    changePasswdButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    changePasswdButton.setBorderPainted(false);
    changePasswdButton.setContentAreaFilled(false);
    changePasswdButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    changePasswdButton.setFocusPainted(false);
    changePasswdButton.setMaximumSize(new Dimension(30, 20));
    changePasswdButton.setMinimumSize(new Dimension(30, 20));
    changePasswdButton.addMouseListener(formListener);
    changePasswdButton.addActionListener(formListener);

    GroupLayout fileButtonPaneLayout = new GroupLayout(fileButtonPane);
    fileButtonPane.setLayout(fileButtonPaneLayout);
    fileButtonPaneLayout.setHorizontalGroup(fileButtonPaneLayout
            .createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(fileButtonPaneLayout.createSequentialGroup()
                    .addComponent(uploadFileButton, GroupLayout.PREFERRED_SIZE, 46, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(downloadFileButton, GroupLayout.PREFERRED_SIZE, 46,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(deleteFileButton, GroupLayout.PREFERRED_SIZE, 46, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(renameFileButton, GroupLayout.PREFERRED_SIZE, 57, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(authorizationButton, GroupLayout.PREFERRED_SIZE, 63,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(addNoteButton, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(deleteNoteButton, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(targetIDField, GroupLayout.PREFERRED_SIZE, 115, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(searchUserButton, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(returnButton, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(refreshButton, GroupLayout.PREFERRED_SIZE, 46, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator4, GroupLayout.PREFERRED_SIZE, 2, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(changePasswdButton,
                            GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(18, Short.MAX_VALUE)));
    fileButtonPaneLayout.setVerticalGroup(fileButtonPaneLayout
            .createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING,
                    fileButtonPaneLayout.createSequentialGroup().addContainerGap().addGroup(fileButtonPaneLayout
                            .createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(jSeparator4)
                            .addGroup(fileButtonPaneLayout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
                                    .addGroup(fileButtonPaneLayout
                                            .createParallelGroup(GroupLayout.Alignment.TRAILING)
                                            .addComponent(changePasswdButton, GroupLayout.PREFERRED_SIZE, 25,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addGroup(fileButtonPaneLayout
                                                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                                                    .addComponent(refreshButton, GroupLayout.PREFERRED_SIZE, 25,
                                                            GroupLayout.PREFERRED_SIZE)
                                                    .addGroup(fileButtonPaneLayout
                                                            .createParallelGroup(
                                                                    GroupLayout.Alignment.TRAILING, false)
                                                            .addComponent(jSeparator2)
                                                            .addGroup(fileButtonPaneLayout
                                                                    .createParallelGroup(
                                                                            GroupLayout.Alignment.BASELINE)
                                                                    .addComponent(addNoteButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(deleteNoteButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE))
                                                            .addComponent(jSeparator1)
                                                            .addGroup(fileButtonPaneLayout
                                                                    .createParallelGroup(
                                                                            GroupLayout.Alignment.BASELINE)
                                                                    .addComponent(downloadFileButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(deleteFileButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(renameFileButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(authorizationButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addComponent(uploadFileButton,
                                                                            GroupLayout.PREFERRED_SIZE, 25,
                                                                            GroupLayout.PREFERRED_SIZE))
                                                            .addComponent(jSeparator3)
                                                            .addGroup(GroupLayout.Alignment.LEADING,
                                                                    fileButtonPaneLayout.createParallelGroup(
                                                                            GroupLayout.Alignment.BASELINE)
                                                                            .addComponent(targetIDField)
                                                                            .addComponent(searchUserButton,
                                                                                    GroupLayout.PREFERRED_SIZE,
                                                                                    25,
                                                                                    GroupLayout.PREFERRED_SIZE)
                                                                            .addComponent(returnButton,
                                                                                    GroupLayout.PREFERRED_SIZE,
                                                                                    25,
                                                                                    GroupLayout.PREFERRED_SIZE)))))))
                            .addGap(15, 15, 15)));

    fileSplitPane.setBackground(new Color(255, 255, 255));
    fileSplitPane.setDividerLocation(750);
    fileSplitPane.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    fileSplitPane.setMaximumSize(new Dimension(1366, 768));
    fileSplitPane.setPreferredSize(new Dimension(701, 646));

    jSplitPane2.setDividerLocation(400);
    jSplitPane2.setOrientation(JSplitPane.VERTICAL_SPLIT);
    jSplitPane2.setContinuousLayout(true);
    jSplitPane2.setMaximumSize(new Dimension(1366, 768));

    fileInfoScroll.setBackground(new Color(255, 255, 255));
    fileInfoScroll.setFont(new Font("", 0, 12)); // NOI18N
    fileInfoScroll.getViewport().setBackground(Color.WHITE);
    fileInfoScroll.addMouseListener(formListener);

    fileInfoTable.setAutoCreateRowSorter(true);
    fileInfoTable.setFont(new Font("", 0, 12)); // NOI18N
    fileInfoTable.setModel(fileTableModel);
    fileInfoTable.getTableHeader().setFont(new Font("", 0, 12));
    fileInfoTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
    fileInfoTable.setRowHeight(20);
    fileInfoTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    fileInfoTable.setShowHorizontalLines(false);
    fileInfoTable.setShowVerticalLines(false);
    fileInfoTable.addMouseListener(formListener);
    fileInfoTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

        public void valueChanged(ListSelectionEvent evt) {
            fileSelectedChanged(evt);
        }
    });
    fileInfoScroll.setViewportView(fileInfoTable);

    jSplitPane2.setTopComponent(fileInfoScroll);

    noteDisplayScroll.setBackground(new Color(255, 255, 255));
    noteDisplayScroll.setFont(new Font("", 0, 12)); // NOI18N
    noteDisplayScroll.getViewport().setBackground(Color.WHITE);
    noteDisplayScroll.addMouseListener(formListener);

    noteTable.setAutoCreateRowSorter(true);
    noteTable.setFont(new Font("", 0, 12)); // NOI18N
    noteTable.setModel(noteTableModel);
    noteTable.getTableHeader().setFont(new Font("", 0, 12));
    noteTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
    noteTable.setRowHeight(20);
    noteTable.setShowHorizontalLines(false);
    noteTable.setShowVerticalLines(false);
    noteTable.addMouseListener(formListener);
    noteTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent evt) {
            noteSelectedChanged(evt);
        }
    });
    noteDisplayScroll.setViewportView(noteTable);

    jSplitPane2.setBottomComponent(noteDisplayScroll);

    fileSplitPane.setLeftComponent(jSplitPane2);

    jSplitPane1.setDividerLocation(500);
    jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT);

    fileDisplayScroll.setFont(new Font("", 0, 12)); // NOI18N
    fileDisplayScroll.setMinimumSize(new Dimension(30, 30));

    fileContentArea.setEditable(false);
    fileContentArea.setColumns(20);
    fileContentArea.setFont(new Font("", 0, 12)); // NOI18N
    fileContentArea.setRows(5);
    fileContentArea.setToolTipText("");
    fileContentArea
            .setBorder(BorderFactory.createTitledBorder(null, "", TitledBorder.DEFAULT_JUSTIFICATION,
                    TitledBorder.DEFAULT_POSITION, new Font("", 0, 12))); // NOI18N
    fileDisplayScroll.setViewportView(fileContentArea);

    jSplitPane1.setTopComponent(fileDisplayScroll);

    noteInputScroll.setFont(new Font("", 0, 12)); // NOI18N
    noteInputScroll.setMaximumSize(new Dimension(1366, 768));
    noteInputScroll.setMinimumSize(new Dimension(30, 30));

    noteInputArea.setColumns(20);
    noteInputArea.setFont(new Font("", 0, 12)); // NOI18N
    noteInputArea.setRows(5);
    noteInputArea.setToolTipText("");
    noteInputArea
            .setBorder(BorderFactory.createTitledBorder(null, "", TitledBorder.DEFAULT_JUSTIFICATION,
                    TitledBorder.DEFAULT_POSITION, new Font("", 0, 12))); // NOI18N
    noteInputScroll.setViewportView(noteInputArea);

    jSplitPane1.setBottomComponent(noteInputScroll);

    fileSplitPane.setRightComponent(jSplitPane1);

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addComponent(fileSplitPane, GroupLayout.DEFAULT_SIZE, 1346, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(fileButtonPane, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE)))
            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(fileButtonPane, GroupLayout.PREFERRED_SIZE, 38, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(fileSplitPane,
                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
}