Example usage for javax.swing.border EmptyBorder EmptyBorder

List of usage examples for javax.swing.border EmptyBorder EmptyBorder

Introduction

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

Prototype

public EmptyBorder(int top, int left, int bottom, int right) 

Source Link

Document

Creates an empty border with the specified insets.

Usage

From source file:au.com.jwatmuff.eventmanager.gui.main.LoadCompetitionWindow.java

private void loadBackupButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadBackupButtonActionPerformed
    File databaseStore = new File(Main.getWorkingDirectory(), "comps");
    JFileChooser chooser = new JFileChooser();
    chooser.setFileFilter(new FileNameExtensionFilter("Event Manager Files", "evm"));

    JPanel optionsPanel = new JPanel();

    optionsPanel.setBorder(//from  w w w. ja  va 2  s . co  m
            new CompoundBorder(new EmptyBorder(0, 10, 0, 10), new TitledBorder("Load backup options")));
    JCheckBox preserveIDCheckbox = new JCheckBox("Preserve competition ID");
    optionsPanel.add(preserveIDCheckbox);

    chooser.setAccessory(optionsPanel);

    if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
        /* input zip file */
        File file = chooser.getSelectedFile();
        /* construct output directory */
        File dir = new File(databaseStore, file.getName());
        int suffix = 0;
        while (dir.exists()) {
            suffix++;
            dir = new File(databaseStore, file.getName() + "_" + suffix);
        }
        /* unzip */
        try {
            ZipUtils.unzipFile(dir, file);

            /* change id */
            Properties props = new Properties();
            FileReader fr = new FileReader(new File(dir, "info.dat"));
            props.load(fr);
            fr.close();
            if (!preserveIDCheckbox.isSelected()) {
                props.setProperty("UUID", UUID.randomUUID().toString());
            }
            props.setProperty("name", props.getProperty("name") + " - " + dateFormat.format(new Date()));
            FileWriter fw = new FileWriter(new File(dir, "info.dat"));
            props.store(fw, "");
            fw.close();

            /* update gui */
            checkDatabasesExecutor.schedule(checkDatabasesTask, 0, TimeUnit.MILLISECONDS);
        } catch (Exception e) {
            GUIUtils.displayError(null, "Error while opening file: " + e.getMessage());
        }
    }
}

From source file:edu.snu.leader.discrete.simulator.SimulatorLauncherGUI.java

JFrame createJFrameErrorMessages(ErrorPacketContainer errorPackets, JTabbedPane theTabbedPane) {
    JFrame errorMessages = new JFrame();
    JPanel errorMessagesContentPane = new JPanel();

    errorMessages.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    errorMessages.setTitle("Error Messages");
    errorMessages.setBounds(this.getX() + this.getWidth() + 5, this.getY(), 350, 300);
    errorMessagesContentPane = new JPanel();
    errorMessagesContentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    errorMessagesContentPane.setLayout(new BorderLayout(0, 0));
    errorMessages.setContentPane(errorMessagesContentPane);

    JPanel panel = new JPanel();
    errorMessagesContentPane.add(panel, BorderLayout.NORTH);
    panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

    for (int i = 0; i < errorPackets.errorMessages.size(); i++) {
        JTextPane temp = createErrorPane(errorPackets.errorMessages.get(i),
                errorPackets.erroredComponents.get(i), theTabbedPane, errorPackets.tabIndexes.get(i));
        panel.add(temp);/*from w  w w .  j ava2s . com*/
    }

    return errorMessages;
}

From source file:com.maxl.java.amikodesk.AMiKoDesk.java

private static void setupToggleButton(JToggleButton button) {
    button.setBackground(m_but_color_bg);
    button.setFocusPainted(false);/*from   w w w.ja  v  a2  s. c o  m*/
    button.setBorder(new CompoundBorder(new LineBorder(m_but_color_bg), new EmptyBorder(0, 3, 0, 0)));
    button.setHorizontalAlignment(SwingConstants.LEFT);
}

From source file:com.diversityarrays.kdxplore.curate.TrialDataEditor.java

private List<JButton> createVisualisationButtons() {

    List<JButton> visButtons = new ArrayList<>();

    for (final VisualisationTool tool : visualisationTools) {

        JButton button = new JButton();
        button.setBorder(new CompoundBorder(new EmptyBorder(2, 2, 2, 2),
                BorderFactory.createBevelBorder(BevelBorder.RAISED)));
        Icon icon = tool.getToolIcon();
        if (icon != null) {
            button.setIcon(icon);//from   ww w .ja  va 2s  . co m
        } else {
            button.setName(tool.getToolButtonName());
        }

        boolean onlyForDeveloper = false;

        VisualisationToolActionListener actionListener = new VisualisationToolActionListener(
                TrialDataEditor.this, getTitle(), onlyForDeveloper, curationContext, tool);

        button.addActionListener(actionListener);
        visButtons.add(button);
        button.setText(tool.getToolName());
    }
    return visButtons;
}

From source file:com.projity.pm.graphic.frames.GraphicManager.java

public void setRibbon(JRibbonFrame frame, MenuManager menuManger) {

    final JPanel filtersPanel = new JPanel(new GridLayout(3, 1));
    filterToolBarManager = FilterToolBarManager.create(getMenuManager());
    filterToolBarManager.addButtonsInRibbonBand(filtersPanel);

    CustomRibbonBandGenerator customBandsGenerator = new CustomRibbonBandGenerator() {

        @Override/*from   w  w  w.ja va 2 s .  c o m*/
        public JComponent createRibbonComponent(String ribbonBandName) {
            if ("FiltersRibbonBand".equals(ribbonBandName)) {
                return filtersPanel;
            } else
                return null;
        }
    };

    Collection<RibbonTask> ribbonTasks = menuManger.getRibbon(MenuManager.STANDARD_RIBBON,
            customBandsGenerator);
    JRibbon ribbon = frame.getRibbon();

    for (RibbonTask ribbonTask : ribbonTasks) {
        ribbon.addTask(ribbonTask);
    }

    RibbonApplicationMenu applicationMenu = new RibbonApplicationMenu();

    ribbon.setApplicationMenu(applicationMenu);

    Collection<AbstractCommandButton> taskBars = menuManger.getTaskBar(MenuManager.STANDARD_RIBBON);
    for (AbstractCommandButton button : taskBars)
        ribbon.addTaskbarComponent(button);

    ribbon.configureHelp(IconManager.getRibbonIcon("ribbon.help", 26, 26), new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            showHelpDialog();

        }
    });

    JLabel openprojLogo = ribbon.getOpenprojLogo();
    openprojLogo.setIcon(IconManager.getIcon("logo.OpenProj"));
    openprojLogo.addMouseListener(new MouseAdapter() {
        public void mousePressed(MouseEvent me) {
            BrowserControl.displayURL("http://www.projity.com/");
        }
    });

    JPanel projectViews = ribbon.getProjectViews();
    projectViews.setBorder(new EmptyBorder(0, 0, 0, 0));
    getMenuManager().initComponent(MenuManager.RIBBON_VIEW_BAR, projectViews);

    JPanel fileSelector = ribbon.getFileSelector();
    fileSelector.setLayout(new BorderLayout());
    fileSelector.setBackground(ProjectLibreRibbonUI.RIBBON_MENU_COLOR);
    JComponent filesComponent = ((DefaultFrameManager) getFrameManager()).getProjectComboPanel();
    filesComponent.setBackground(ProjectLibreRibbonUI.RIBBON_MENU_COLOR);
    fileSelector.add(filesComponent, BorderLayout.EAST);
    projectViews.setBorder(new EmptyBorder(0, 0, 0, 0));

}

From source file:edu.ku.brc.specify.tasks.subpane.wb.wbuploader.Uploader.java

public static void showStructureErrors(Vector<UploadMessage> structureErrors) {
    JPanel pane = new JPanel(new BorderLayout());
    JLabel lbl = createLabel(getResourceString("WB_UPLOAD_BAD_STRUCTURE_MSG") + ":");
    lbl.setBorder(new EmptyBorder(3, 1, 2, 0));
    pane.add(lbl, BorderLayout.NORTH);
    JPanel lstPane = new JPanel(new BorderLayout());
    JList<?> lst = UIHelper.createList(structureErrors);
    lst.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
    lstPane.setBorder(new EmptyBorder(1, 1, 10, 1));
    lstPane.add(lst, BorderLayout.CENTER);
    pane.add(lstPane, BorderLayout.CENTER);
    CustomDialog dlg = new CustomDialog((Frame) UIRegistry.getTopWindow(),
            getResourceString("WB_UPLOAD_BAD_STRUCTURE_DLG"), true, CustomDialog.OKHELP, pane);
    UIHelper.centerAndShow(dlg);/*  ww w  .j a  va 2s.  c o  m*/
    dlg.dispose();
}

From source file:op.care.bhp.PnlBHP.java

private java.util.List<Component> addFilter() {
    java.util.List<Component> list = new ArrayList<Component>();

    jdcDatum = new JDateChooser(new Date());
    jdcDatum.setFont(new Font("Arial", Font.PLAIN, 18));
    jdcDatum.setMinSelectableDate(BHPTools.getMinDatum(resident));

    jdcDatum.setBackground(Color.WHITE);
    jdcDatum.addPropertyChangeListener(new PropertyChangeListener() {
        @Override//w  ww. ja  v a2s. co m
        public void propertyChange(PropertyChangeEvent evt) {
            if (initPhase) {
                return;
            }
            if (evt.getPropertyName().equals("date")) {
                reloadDisplay();
            }
        }
    });
    list.add(jdcDatum);

    JPanel buttonPanel = new JPanel();
    buttonPanel.setBackground(Color.WHITE);
    buttonPanel.setLayout(new HorizontalLayout(5));
    buttonPanel.setBorder(new EmptyBorder(0, 0, 0, 0));

    JButton homeButton = new JButton(
            new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_start.png")));
    homeButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            jdcDatum.setDate(jdcDatum.getMinSelectableDate());
        }
    });
    homeButton.setPressedIcon(
            new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_start_pressed.png")));
    homeButton.setBorder(null);
    homeButton.setBorderPainted(false);
    homeButton.setOpaque(false);
    homeButton.setContentAreaFilled(false);
    homeButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

    JButton backButton = new JButton(
            new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_back.png")));
    backButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            DateMidnight current = new DateMidnight(jdcDatum.getDate());
            DateMidnight min = new DateMidnight(jdcDatum.getMinSelectableDate());
            if (current.equals(min)) {
                return;
            }
            jdcDatum.setDate(SYSCalendar.addDate(jdcDatum.getDate(), -1));
        }
    });
    backButton
            .setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_back_pressed.png")));
    backButton.setBorder(null);
    backButton.setBorderPainted(false);
    backButton.setOpaque(false);
    backButton.setContentAreaFilled(false);
    backButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

    JButton fwdButton = new JButton(new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_play.png")));
    fwdButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            DateMidnight current = new DateMidnight(jdcDatum.getDate());
            if (current.equals(new DateMidnight())) {
                return;
            }
            jdcDatum.setDate(SYSCalendar.addDate(jdcDatum.getDate(), 1));
        }
    });
    fwdButton
            .setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_play_pressed.png")));
    fwdButton.setBorder(null);
    fwdButton.setBorderPainted(false);
    fwdButton.setOpaque(false);
    fwdButton.setContentAreaFilled(false);
    fwdButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

    JButton endButton = new JButton(new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_end.png")));
    endButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            jdcDatum.setDate(new Date());
        }
    });
    endButton.setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_end_pressed.png")));
    endButton.setBorder(null);
    endButton.setBorderPainted(false);
    endButton.setOpaque(false);
    endButton.setContentAreaFilled(false);
    endButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

    buttonPanel.add(homeButton);
    buttonPanel.add(backButton);
    buttonPanel.add(fwdButton);
    buttonPanel.add(endButton);

    list.add(buttonPanel);

    //        panelFilter.setContentPane(labelPanel);

    return list;
}

From source file:op.care.dfn.PnlDFN.java

private List<Component> addFilters() {
    List<Component> list = new ArrayList<Component>();

    jdcDate = new JDateChooser(new Date());
    jdcDate.setFont(new Font("Arial", Font.PLAIN, 14));

    jdcDate.setBackground(Color.WHITE);

    list.add(jdcDate);//from w  w w.  ja v a 2  s  .c o  m

    JPanel buttonPanel = new JPanel();
    buttonPanel.setBackground(Color.WHITE);
    buttonPanel.setLayout(new HorizontalLayout(5));
    buttonPanel.setBorder(new EmptyBorder(0, 0, 0, 0));

    final JButton homeButton = new JButton(
            new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_start.png")));
    homeButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            jdcDate.setDate(jdcDate.getMinSelectableDate());
        }
    });
    homeButton.setPressedIcon(
            new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_start_pressed.png")));
    homeButton.setBorder(null);
    homeButton.setBorderPainted(false);
    homeButton.setOpaque(false);
    homeButton.setContentAreaFilled(false);
    homeButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

    final JButton backButton = new JButton(
            new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_back.png")));
    backButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            DateMidnight current = new DateMidnight(jdcDate.getDate());
            DateMidnight min = new DateMidnight(jdcDate.getMinSelectableDate());
            if (current.equals(min)) {
                return;
            }
            jdcDate.setDate(SYSCalendar.addDate(jdcDate.getDate(), -1));
        }
    });
    backButton
            .setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_back_pressed.png")));
    backButton.setBorder(null);
    backButton.setBorderPainted(false);
    backButton.setOpaque(false);
    backButton.setContentAreaFilled(false);
    backButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

    final JButton fwdButton = new JButton(
            new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_play.png")));
    fwdButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            DateMidnight current = new DateMidnight(jdcDate.getDate());
            if (current.equals(new DateMidnight())) {
                return;
            }
            jdcDate.setDate(SYSCalendar.addDate(jdcDate.getDate(), 1));
        }
    });
    fwdButton
            .setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_play_pressed.png")));
    fwdButton.setBorder(null);
    fwdButton.setBorderPainted(false);
    fwdButton.setOpaque(false);
    fwdButton.setContentAreaFilled(false);
    fwdButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

    final JButton endButton = new JButton(
            new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_end.png")));
    endButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            jdcDate.setDate(new Date());
        }
    });
    endButton.setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/bw/player_end_pressed.png")));
    endButton.setBorder(null);
    endButton.setBorderPainted(false);
    endButton.setOpaque(false);
    endButton.setContentAreaFilled(false);
    endButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

    buttonPanel.add(homeButton);
    buttonPanel.add(backButton);
    buttonPanel.add(fwdButton);
    buttonPanel.add(endButton);

    list.add(buttonPanel);

    jdcDate.addPropertyChangeListener(new PropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            if (initPhase) {
                return;
            }
            if (evt.getPropertyName().equals("date")) {
                reloadDisplay();
            }
        }
    });

    return list;
}

From source file:op.care.sysfiles.PnlFiles.java

private void tblFilesMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblFilesMousePressed

    Point p = evt.getPoint();//from   w  ww .  j a v a 2 s  . co m
    ListSelectionModel lsm = tblFiles.getSelectionModel();
    Point p2 = evt.getPoint();
    SwingUtilities.convertPointToScreen(p2, tblFiles);
    final Point screenposition = p2;

    boolean singleRowSelected = lsm.getMaxSelectionIndex() == lsm.getMinSelectionIndex();

    final int row = tblFiles.rowAtPoint(p);
    final int col = tblFiles.columnAtPoint(p);

    if (singleRowSelected) {
        lsm.setSelectionInterval(row, row);
    }

    final TMSYSFiles tm = (TMSYSFiles) tblFiles.getModel();
    final SYSFiles sysfile = tm.getRow(tblFiles.convertRowIndexToModel(row));

    if (SwingUtilities.isRightMouseButton(evt)) {

        SYSTools.unregisterListeners(menu);
        menu = new JPopupMenu();

        // SELECT
        JMenuItem itemPopupShow = new JMenuItem(SYSTools.xx("misc.commands.show"), SYSConst.icon22magnify1);
        itemPopupShow.addActionListener(new java.awt.event.ActionListener() {

            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SYSFilesTools.handleFile(sysfile, Desktop.Action.OPEN);
            }
        });
        menu.add(itemPopupShow);

        if (col == TMSYSFiles.COL_DESCRIPTION
                && OPDE.getAppInfo().isAllowedTo(InternalClassACL.UPDATE, internalClassID)) {

            final JMenuItem itemPopupEdit = new JMenuItem(SYSTools.xx("misc.commands.edit"),
                    SYSConst.icon22edit3);
            itemPopupEdit.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {

                    final JidePopup popup = new JidePopup();
                    popup.setMovable(false);
                    popup.getContentPane()
                            .setLayout(new BoxLayout(popup.getContentPane(), BoxLayout.LINE_AXIS));

                    final JComponent editor = new JTextArea(sysfile.getBeschreibung(), 10, 40);
                    ((JTextArea) editor).setLineWrap(true);
                    ((JTextArea) editor).setWrapStyleWord(true);
                    ((JTextArea) editor).setEditable(true);

                    popup.getContentPane().add(new JScrollPane(editor));
                    final JButton saveButton = new JButton(SYSConst.icon22apply);
                    saveButton.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent actionEvent) {
                            EntityManager em = OPDE.createEM();
                            try {
                                em.getTransaction().begin();
                                popup.hidePopup();
                                SYSFiles mySysfile = em.merge(sysfile);
                                mySysfile.setBeschreibung(((JTextArea) editor).getText().trim());
                                em.getTransaction().commit();
                                tm.setSYSFile(tblFiles.convertRowIndexToModel(row), mySysfile);
                            } catch (Exception e) {
                                em.getTransaction().rollback();
                                OPDE.fatal(e);
                            } finally {
                                em.close();
                            }

                        }
                    });

                    saveButton.setHorizontalAlignment(SwingConstants.RIGHT);
                    JPanel pnl = new JPanel(new BorderLayout(10, 10));
                    JScrollPane pnlEditor = new JScrollPane(editor);

                    pnl.add(pnlEditor, BorderLayout.CENTER);
                    JPanel buttonPanel = new JPanel();
                    buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
                    buttonPanel.add(saveButton);
                    pnl.setBorder(new EmptyBorder(10, 10, 10, 10));
                    pnl.add(buttonPanel, BorderLayout.SOUTH);

                    popup.setOwner(tblFiles);
                    popup.removeExcludedComponent(tblFiles);
                    popup.getContentPane().add(pnl);
                    popup.setDefaultFocusComponent(editor);

                    popup.showPopup(screenposition.x, screenposition.y);

                }
            });
            menu.add(itemPopupEdit);
        }

        if (OPDE.getAppInfo().isAllowedTo(InternalClassACL.DELETE, internalClassID)) {
            JMenuItem itemPopupDelete = new JMenuItem(SYSTools.xx("misc.commands.delete"),
                    SYSConst.icon22delete);
            itemPopupDelete.addActionListener(new java.awt.event.ActionListener() {

                public void actionPerformed(java.awt.event.ActionEvent evt) {

                    new DlgYesNo(
                            SYSTools.xx("misc.questions.delete1") + "<br/><b>" + sysfile.getFilename()
                                    + "</b><br/>" + SYSTools.xx("misc.questions.delete2"),
                            new ImageIcon(getClass().getResource("/artwork/48x48/bw/trashcan_empty.png")),
                            new Closure() {
                                @Override
                                public void execute(Object o) {
                                    if (o.equals(JOptionPane.YES_OPTION)) {
                                        SYSFilesTools.deleteFile(sysfile);
                                        reloadTable();
                                    }
                                }
                            });

                }
            });
            menu.add(itemPopupDelete);
            itemPopupDelete.setEnabled(singleRowSelected);
        }

        menu.show(evt.getComponent(), (int) p.getX(), (int) p.getY());
    } else if (evt.getClickCount() == 2) {
        SYSFilesTools.handleFile(sysfile, Desktop.Action.OPEN);
    }

}

From source file:op.system.DlgLogin.java

/**
 * This method is called from within the constructor to
 * initialize the printerForm.//  w ww . ja  v a 2 s.com
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the PrinterForm Editor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    jPanel2 = new JPanel();
    lblOPDE = new JLabel();
    btnAbout = new JButton();
    lblUsernamePassword = new JLabel();
    txtUsername = new JTextField();
    txtPassword = new JPasswordField();
    panel1 = new JPanel();
    btnExit = new JButton();
    hSpacer1 = new JPanel(null);
    btnLogin = new JButton();

    //======== this ========
    setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
    setResizable(false);
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    addWindowListener(new WindowAdapter() {
        @Override
        public void windowActivated(WindowEvent e) {
            thisWindowActivated(e);
        }
    });
    Container contentPane = getContentPane();
    contentPane.setLayout(new FormLayout("13dlu, default, 13dlu",
            "13dlu, $lgap, fill:48dlu:grow, $lgap, default, $lgap, 13dlu"));

    //======== jPanel2 ========
    {
        jPanel2.setBorder(new EmptyBorder(5, 5, 5, 5));
        jPanel2.setOpaque(false);
        jPanel2.setLayout(new VerticalLayout(10));

        //---- lblOPDE ----
        lblOPDE.setText("Offene-Pflege.de");
        lblOPDE.setFont(new Font("Arial", Font.PLAIN, 24));
        lblOPDE.setHorizontalAlignment(SwingConstants.CENTER);
        jPanel2.add(lblOPDE);

        //---- btnAbout ----
        btnAbout.setIcon(new ImageIcon(getClass().getResource("/artwork/256x256/opde-logo.png")));
        btnAbout.setBorderPainted(false);
        btnAbout.setBorder(null);
        btnAbout.setOpaque(false);
        btnAbout.setContentAreaFilled(false);
        btnAbout.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        btnAbout.setToolTipText(null);
        btnAbout.addActionListener(e -> btnAboutActionPerformed(e));
        jPanel2.add(btnAbout);

        //---- lblUsernamePassword ----
        lblUsernamePassword.setText("text");
        lblUsernamePassword.setFont(new Font("Arial", Font.PLAIN, 18));
        jPanel2.add(lblUsernamePassword);

        //---- txtUsername ----
        txtUsername.setFont(new Font("Arial", Font.PLAIN, 18));
        txtUsername.addActionListener(e -> txtUsernameActionPerformed(e));
        txtUsername.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                txtUsernameFocusGained(e);
            }
        });
        jPanel2.add(txtUsername);

        //---- txtPassword ----
        txtPassword.setFont(new Font("Arial", Font.PLAIN, 18));
        txtPassword.addActionListener(e -> txtPasswordActionPerformed(e));
        txtPassword.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                txtPasswordFocusGained(e);
            }
        });
        jPanel2.add(txtPassword);
    }
    contentPane.add(jPanel2, CC.xy(2, 3, CC.FILL, CC.DEFAULT));

    //======== panel1 ========
    {
        panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS));

        //---- btnExit ----
        btnExit.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/exit.png")));
        btnExit.addActionListener(e -> btnExitActionPerformed(e));
        panel1.add(btnExit);
        panel1.add(hSpacer1);

        //---- btnLogin ----
        btnLogin.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png")));
        btnLogin.setActionCommand("btnLogin");
        btnLogin.addActionListener(e -> DoLogin(e));
        panel1.add(btnLogin);
    }
    contentPane.add(panel1, CC.xy(2, 5, CC.RIGHT, CC.DEFAULT));
    setSize(320, 540);
    setLocationRelativeTo(getOwner());
}