Example usage for javax.swing SwingConstants CENTER

List of usage examples for javax.swing SwingConstants CENTER

Introduction

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

Prototype

int CENTER

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

Click Source Link

Document

The central position in an area.

Usage

From source file:br.org.acessobrasil.ases.ferramentas_de_reparo.vista.imagem.analise_geral.PanelAnaliseGeral.java

/**
 * Inicia os componentes/*from  w  ww.j ava2 s. com*/
 * 
 * @param erros
 */

private void initComponentsEscalavel(ArrayList<FerramentaAnaliseGeralModel> erros) {
    incValueProgress();
    hashCodeInicial = null;
    PainelStatusBar.hideProgTarReq();
    Ferramenta_Imagens.carregaTexto(TokenLang.LANG);
    JPanel regraFonteBtn = new JPanel();
    regraFonteBtn.setLayout(new BorderLayout());
    PainelStatusBar.setValueProgress(3);
    boxCode = new G_TextAreaSourceCode();
    boxCode.setTipoHTML();
    incValueProgress();
    parentFrame.setJMenuBar(this.criaMenuBar());
    PainelStatusBar.setValueProgress(6);
    // parentFrame.setTitle("Associador de rtulos");
    tableLinCod = new TabelaAnaliseGeral(this, erros);
    arTextPainelCorrecao = new ArTextPainelCorrecao(this);
    incValueProgress();
    // scrollPaneCorrecaoLabel = new ConteudoCorrecaoLabel();
    analiseSistematica = new JButton();
    salvar = new JButton();

    cancelar = new JButton();

    salvarMod = new JButton();

    salvarPag = new JButton();

    aplicarPag = new JButton();

    aplicarTod = new JButton();

    strConteudoalt = new String();
    incValueProgress();
    btnSalvar = new JMenuItem(GERAL.BTN_SALVAR);
    PainelStatusBar.setValueProgress(10);
    pnRegra = new JPanel();
    lbRegras1 = new JLabel();
    lbRegras2 = new JLabel();
    pnSetaDescricao = new JPanel();
    spTextoDescricao = new JScrollPane();
    tArParticipRotulo = new TArParticipRotulo(this);
    conteudoDoAlt = new JTextArea();
    pnListaErros = new JPanel();
    scrollPanetabLinCod = new JScrollPane();
    incValueProgress();
    /**
     * Mostra pro usurio a imagem que est sem descrio
     */
    imagemSemDesc = new XHTMLPanel();

    pnBotoes = new JPanel();
    salvar.setEnabled(false);
    // salvaAlteracoes = new SalvaAlteracoes(boxCode.getTextPane(), salvar,
    // btnSalvar, parentFrame);
    adicionar = new JButton();
    aplicar = new JButton();
    conteudoParticRotulo = new ArrayList<String>();
    analiseSistematica.setEnabled(false);
    boxCode.getTextPane().setText(TxtBuffer.getContent());
    PainelStatusBar.setValueProgress(20);
    String fullUrl = this.enderecoImagem;
    System.out.println("\t\t\t\t\tendereo da imagem: " + fullUrl);
    SetImage setImage = new SetImage(this, fullUrl);
    setImage.start();
    incValueProgress();
    setBackground(CoresDefault.getCorPaineis());
    Container contentPane = this;// ??
    contentPane.setLayout(new GridLayout(2, 1));
    incValueProgress();
    // ======== pnRegra ========
    {
        pnRegra.setBorder(criaBorda(Ferramenta_Imagens.TITULO_REGRA));
        pnRegra.setLayout(new GridLayout(2, 1));
        pnRegra.add(lbRegras1);
        lbRegras1.setText(Ferramenta_Imagens.REGRAP1);
        lbRegras2.setText(Ferramenta_Imagens.REGRAP2);
        lbRegras1.setHorizontalAlignment(SwingConstants.CENTER);
        lbRegras2.setHorizontalAlignment(SwingConstants.CENTER);
        pnRegra.add(lbRegras1);
        pnRegra.add(lbRegras2);
        pnRegra.setPreferredSize(new Dimension(700, 60));
        incValueProgress();
    }
    PainelStatusBar.setValueProgress(30);
    // G_URLIcon.setIcon(lbTemp,
    // "http://pitecos.blogs.sapo.pt/arquivo/pai%20natal%20o5.%20jpg.jpg");
    JScrollPane sp = new JScrollPane();

    sp.setViewportView(imagemSemDesc);
    sp.setPreferredSize(new Dimension(500, 300));

    // ======== pnDescricao ========
    incValueProgress();
    // ---- Salvar ----
    salvarMod.setText(GERAL.SALVAR_MODIFICADAS);
    salvarMod.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            salvarModificadosActionPerformed(e);
        }
    });
    incValueProgress();
    salvarMod.setToolTipText(GERAL.DICA_SALVAR_MODIFICADOS);
    salvarMod.getAccessibleContext().setAccessibleDescription(GERAL.DICA_SALVAR_MODIFICADOS);
    salvarMod.getAccessibleContext().setAccessibleName(GERAL.DICA_SALVAR_MODIFICADOS);
    salvarMod.setBounds(10, 0, 150, 25);
    PainelStatusBar.setValueProgress(40);
    salvarPag.setText(GERAL.SALVAR_ULTIMA);
    salvarPag.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            salvarPaginaActionPerformed(e);
        }
    });
    incValueProgress();
    salvarPag.setToolTipText(GERAL.DICA_SALVAR_ULTIMA_MODIFICADA);
    salvarPag.getAccessibleContext().setAccessibleDescription(GERAL.DICA_SALVAR_ULTIMA_MODIFICADA);
    salvarPag.getAccessibleContext().setAccessibleName(Ferramenta_Imagens.DICA_ABRIR_HTML);
    salvarPag.setBounds(165, 0, 150, 25);
    incValueProgress();
    salvarMod.setEnabled(false);
    salvarPag.setEnabled(false);
    ArrayList<JButton> btnsSalvar = new ArrayList<JButton>();
    btnsSalvar.add(salvarMod);
    btnsSalvar.add(salvarPag);
    btnsSalvar.add(salvar);
    salvaAlteracoes = new SalvaAlteracoes(boxCode.getTextPane(), btnsSalvar, btnSalvar, parentFrame);
    aplicarPag.setText(GERAL.APLICAR_PAGINA);
    aplicarPag.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            aplicarPaginaActionPerformed(e);
        }
    });
    incValueProgress();
    PainelStatusBar.setValueProgress(50);
    aplicarPag.setToolTipText(GERAL.DICA_APLICA_PAGINA);
    aplicarPag.getAccessibleContext().setAccessibleDescription(GERAL.DICA_APLICA_PAGINA);
    aplicarPag.getAccessibleContext().setAccessibleName(GERAL.DICA_APLICA_PAGINA);
    aplicarPag.setBounds(320, 0, 150, 25);
    incValueProgress();
    aplicarTod.setText(GERAL.APLICA_TODOS);
    aplicarTod.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            Thread t = new Thread(new Runnable() {
                public void run() {
                    aplicarATodosActionPerformed();
                }
            });
            t.start();
        }
    });
    incValueProgress();
    aplicarTod.setToolTipText(GERAL.DICA_APLICA_ULTIMA_TODOS);
    aplicarTod.getAccessibleContext().setAccessibleDescription(GERAL.DICA_APLICA_ULTIMA_TODOS);
    aplicarTod.getAccessibleContext().setAccessibleName(GERAL.DICA_APLICA_ULTIMA_TODOS);
    aplicarTod.setBounds(475, 0, 150, 25);
    aplicarPag.setEnabled(false);
    aplicarTod.setEnabled(false);
    PainelStatusBar.setValueProgress(60);
    incValueProgress();
    cancelar.setText(GERAL.TELA_ANTERIOR);
    cancelar.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            CancelarActionPerformed(e);
        }
    });

    cancelar.setToolTipText(Ferramenta_Imagens.DICA_BTN_CANCELAR);
    cancelar.getAccessibleContext().setAccessibleDescription(Ferramenta_Imagens.DICA_BTN_CANCELAR);
    cancelar.getAccessibleContext().setAccessibleName(Ferramenta_Imagens.DICA_BTN_CANCELAR);
    cancelar.setBounds(630, 0, 150, 25);
    incValueProgress();
    pnSetaDescricao.setBorder(criaBorda(Ferramenta_Imagens.TITULO_DIGITE_O_ALT));
    GridBagConstraints cons = new GridBagConstraints();
    GridBagLayout layout = new GridBagLayout();
    cons.fill = GridBagConstraints.BOTH;
    cons.weighty = 1;
    cons.weightx = 0.80;
    PainelStatusBar.setValueProgress(70);
    incValueProgress();
    pnSetaDescricao.setLayout(layout);
    cons.anchor = GridBagConstraints.SOUTHEAST;
    cons.insets = new Insets(0, 0, 0, 10);
    // ======== spParticRotulo ========
    conteudoDoAlt.addKeyListener(new KeyListener() {
        public void keyPressed(KeyEvent arg0) {
        }

        public void keyTyped(KeyEvent arg0) {
        }

        public void keyReleased(KeyEvent arg0) {
            if (conteudoDoAlt.getText().length() == 0 || tableLinCod.getNumLinhas() < 1) {
                System.out.println("conteudo vazio");
                aplicarPag.setEnabled(false);
                aplicarTod.setEnabled(false);

            } else if (tableLinCod.getSelectedRow() != -1) {
                System.out.println("com conteudo");
                aplicarPag.setEnabled(true);
                aplicarTod.setEnabled(true);

            } else {
                aplicarTod.setEnabled(true);
            }
        }
    });

    {
        spTextoDescricao.setViewportView(conteudoDoAlt);
    }
    incValueProgress();
    // lbRegras1.setText(Reparo_Imagens.REGRAP2);
    // lbRegras1.setHorizontalAlignment(SwingConstants.CENTER);

    // pnRegra.add(lbRegras1);

    pnSetaDescricao.add(spTextoDescricao, cons);
    cons.weightx = 0.20;
    pnSetaDescricao.setPreferredSize(new Dimension(400, 60));

    // ======== pnListaErros ========
    {
        PainelStatusBar.setValueProgress(80);
        pnListaErros.setBorder(criaBorda(Ferramenta_Imagens.LISTA_ERROS));
        pnListaErros.setLayout(new BorderLayout());
        // ======== scrollPanetabLinCod ========
        {
            scrollPanetabLinCod.setViewportView(tableLinCod);
        }
        pnListaErros.add(scrollPanetabLinCod, BorderLayout.CENTER);
    }
    // ======== pnBotoes ========
    incValueProgress();
    {

        // pnBotoes.setBorder(criaBorda(""));

        pnBotoes.setLayout(null);
        // ---- adicionar ----
        adicionar.setText(Ferramenta_Imagens.BTN_ADICIONAR);
        adicionar.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                adicionarActionPerformed(e);
            }
        });
        PainelStatusBar.setValueProgress(90);
        adicionar.setToolTipText(Ferramenta_Imagens.DICA_ADICIONAR);
        adicionar.getAccessibleContext().setAccessibleDescription(Ferramenta_Imagens.DICA_ADICIONAR);
        adicionar.getAccessibleContext().setAccessibleName(Ferramenta_Imagens.DICA_ADICIONAR);
        adicionar.setBounds(10, 5, 150, 25);
        // pnBotoes.add(adicionar);
        incValueProgress();
        // ---- aplicarRotulo ----
        aplicar.setEnabled(false);
        aplicar.setText(Ferramenta_Imagens.BTN_APLICAR);
        aplicar.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                aplicarRotuloActionPerformed(e);
            }
        });
        incValueProgress();
        aplicar.setToolTipText(Ferramenta_Imagens.DICA_APLICAR);
        aplicar.getAccessibleContext().setAccessibleDescription(Ferramenta_Imagens.DICA_APLICAR);
        aplicar.getAccessibleContext().setAccessibleName(Ferramenta_Imagens.DICA_APLICAR);
        aplicar.setBounds(10, 5, 150, 25);
        // pnBotoes.add(aplicar);
    }

    /*
     * Colocar os controles
     */
    pnRegra.setBackground(CoresDefault.getCorPaineis());
    regraFonteBtn.add(pnRegra, BorderLayout.NORTH);
    boxCode.setBorder(criaBorda(""));
    boxCode.setBackground(CoresDefault.getCorPaineis());
    incValueProgress();
    JSplitPane splitPane = null;

    Dimension minimumSize = new Dimension(0, 0);
    // JScrollPane ajudaScrollPane = new
    // JScrollPane(ajuda,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    PainelStatusBar.setValueProgress(93);
    sp.setMinimumSize(minimumSize);
    sp.setPreferredSize(new Dimension(150, 90));
    splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sp, boxCode);
    splitPane.setOneTouchExpandable(true);
    // splitPane.set
    // splitPane.setDividerLocation(0.95);
    int w = parentFrame.getWidth();
    int s = w / 4;
    splitPane.setDividerLocation(s);
    incValueProgress();
    // regraFonteBtn.add(scrollPaneCorrecaoLabel, BorderLayout.CENTER);
    regraFonteBtn.add(splitPane, BorderLayout.CENTER);
    pnBotoes.setPreferredSize(new Dimension(600, 35));
    pnBotoes.setBackground(CoresDefault.getCorPaineis());
    // regraFonteBtn.add(pnBotoes, BorderLayout.SOUTH);
    regraFonteBtn.setBackground(CoresDefault.getCorPaineis());
    contentPane.add(regraFonteBtn);
    PainelStatusBar.setValueProgress(96);
    JPanel textoErrosBtn = new JPanel();
    textoErrosBtn.setLayout(new BorderLayout());
    pnSetaDescricao.setBackground(CoresDefault.getCorPaineis());
    pnSetaDescricao.add(pnBotoes, cons);
    textoErrosBtn.add(pnSetaDescricao, BorderLayout.NORTH);

    textoErrosBtn.add(pnListaErros, BorderLayout.CENTER);
    JPanel pnSalvarCancelar = new JPanel();
    pnSalvarCancelar.setLayout(null);
    pnSalvarCancelar.setPreferredSize(new Dimension(600, 35));
    incValueProgress();
    pnSalvarCancelar.add(salvarMod);
    pnSalvarCancelar.add(salvarPag);
    pnSalvarCancelar.add(aplicarPag);
    pnSalvarCancelar.add(aplicarTod);
    pnSalvarCancelar.add(cancelar);
    pnSalvarCancelar.setBackground(CoresDefault.getCorPaineis());

    incValueProgress();

    textoErrosBtn.add(pnSalvarCancelar, BorderLayout.SOUTH);
    PainelStatusBar.setValueProgress(100);
    pnListaErros.setBackground(CoresDefault.getCorPaineis());
    textoErrosBtn.add(pnListaErros, BorderLayout.CENTER);
    contentPane.setBackground(CoresDefault.getCorPaineis());

    incValueProgress();

    contentPane.add(textoErrosBtn);
    System.out.println("\t\t\t" + TxtBuffer.getContent());

    incValueProgress();

    this.setVisible(true);

}

From source file:be.ugent.maf.cellmissy.gui.controller.analysis.singlecell.SingleCellStatisticsController.java

/**
 * Show Summary Statistics in correspondent table
 *
 * @param analysisGroup/*from  w  w w  .j  av a 2  s. c o m*/
 */
private void showSummary(SingleCellAnalysisGroup singleCellAnalysisGroup) {
    singleCellAnalysisController.getAnalysisPanel().getCurrentGroupName()
            .setText(singleCellAnalysisGroup.getGroupName());
    // set model and cell renderer for statistics summary table
    SingleCellStatSummaryTableModel statisticalSummaryTableModel = new SingleCellStatSummaryTableModel(
            singleCellAnalysisGroup);
    JTable statisticalSummaryTable = singleCellAnalysisController.getAnalysisPanel().getStatTable();
    statisticalSummaryTable.setModel(statisticalSummaryTableModel);
    for (int i = 1; i < statisticalSummaryTable.getColumnCount(); i++) {
        statisticalSummaryTable.getColumnModel().getColumn(i)
                .setCellRenderer(new FormatRenderer(new DecimalFormat("#.####"), SwingConstants.CENTER));
    }
    statisticalSummaryTable.getTableHeader().setDefaultRenderer(new TableHeaderRenderer(SwingConstants.RIGHT));
}

From source file:com.josescalia.tumblr.form.PreferenceForm.java

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

    rbGroupUseProxy = new ButtonGroup();
    folderChooser = new JFileChooser();
    jTabbedPane1 = new JTabbedPane();
    jPanel1 = new JPanel();
    jPanel10 = new JPanel();
    jLabel29 = new JLabel();
    jLabel26 = new JLabel();
    jLabel25 = new JLabel();
    jLabel24 = new JLabel();
    jLabel28 = new JLabel();
    jLabel27 = new JLabel();
    jPanel12 = new JPanel();
    txtProxyPort = new JTextField();
    rbUseProxy = new JRadioButton();
    jLabel2 = new JLabel();
    rbNoProxy = new JRadioButton();
    txtProxyPassword = new JPasswordField();
    jLabel3 = new JLabel();
    txtProxyUsername = new JTextField();
    btnSaveProxyConfig = new JButton();
    jLabel1 = new JLabel();
    jLabel4 = new JLabel();
    txtProxyHost = new JTextField();
    checkProxyNeedAuth = new JCheckBox();
    jPanel2 = new JPanel();
    jPanel11 = new JPanel();
    jLabel35 = new JLabel();
    jLabel30 = new JLabel();
    jLabel33 = new JLabel();
    jLabel32 = new JLabel();
    jLabel31 = new JLabel();
    jLabel34 = new JLabel();
    jPanel14 = new JPanel();
    txtDefaultFolderPath1 = new JTextField();
    jLabel6 = new JLabel();
    txtDefaultFolderPath = new JTextField();
    jLabel7 = new JLabel();
    btnChooseFolder = new JButton();
    btnSaveAppConfig = new JButton();
    jPanel7 = new JPanel();
    jPanel9 = new JPanel();
    jLabel18 = new JLabel();
    jLabel23 = new JLabel();
    jLabel19 = new JLabel();
    jLabel21 = new JLabel();
    jLabel20 = new JLabel();
    jLabel22 = new JLabel();
    jPanel13 = new JPanel();
    jLabel8 = new JLabel();
    btnOpenOtherCacheFolder = new JButton();
    btnDeleteCache = new JButton();
    jLabel9 = new JLabel();
    txtTotalFileSize1 = new JTextField();
    txtTotalFileSize = new JTextField();
    jPanel3 = new JPanel();
    jPanel5 = new JPanel();
    txtTotalLogSize = new JTextField();
    jLabel11 = new JLabel();
    txtTotalLog = new JTextField();
    btnCleanLog = new JButton();
    jLabel13 = new JLabel();
    jPanel6 = new JPanel();
    jLabel12 = new JLabel();
    jScrollPane1 = new JScrollPane();
    txtLogContent = new JTextArea();
    jPanel8 = new JPanel();
    jLabel17 = new JLabel();
    jLabel16 = new JLabel();
    jLabel15 = new JLabel();
    jLabel14 = new JLabel();
    jPanel4 = new JPanel();
    jPanel15 = new JPanel();
    txtAppLookAndFeel = new JTextField();
    jLabel10 = new JLabel();
    btnSaveLF = new JButton();
    btnSelectLF = new JButton();
    jPanel16 = new JPanel();
    jLabel41 = new JLabel();
    jLabel36 = new JLabel();
    jLabel40 = new JLabel();
    jLabel37 = new JLabel();
    jLabel38 = new JLabel();
    jLabel39 = new JLabel();
    jLabel5 = new JLabel();

    jPanel1.setBorder(BorderFactory.createEtchedBorder());

    jPanel10.setBackground(Color.white);
    jPanel10.setBorder(BorderFactory.createEtchedBorder());

    jLabel29.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel29.setText("set up this Proxy Connection.");

    jLabel26.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel26.setText("if this application need to connect to the internet. The setting of this ");

    jLabel25.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel25.setText("The Proxy Connection is a set of configuration which will be applied");

    jLabel24.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel24.setText("Info :");

    jLabel28.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel28.setText("configuration. Contact Computer Network Administrator to correctly");

    jLabel27.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel27.setText("Proxy Connection should be match with the computer network");

    GroupLayout jPanel10Layout = new GroupLayout(jPanel10);
    jPanel10.setLayout(jPanel10Layout);
    jPanel10Layout.setHorizontalGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel28).addComponent(jLabel25).addComponent(jLabel24)
                            .addComponent(jLabel26).addComponent(jLabel27).addComponent(jLabel29))
                    .addContainerGap()));
    jPanel10Layout.setVerticalGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap().addComponent(jLabel24)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel25)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel26)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel27)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel28)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel29)
                    .addContainerGap()));

    jPanel12.setBorder(BorderFactory.createEtchedBorder());

    txtProxyPort.setEnabled(false);

    org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyPort}"), txtProxyPort,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    rbGroupUseProxy.add(rbUseProxy);
    rbUseProxy.setText("Use Proxy");
    rbUseProxy.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rbUseProxyActionPerformed(evt);
        }
    });

    jLabel2.setText("Proxy Port");

    rbGroupUseProxy.add(rbNoProxy);
    rbNoProxy.setText("No Proxy");
    rbNoProxy.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rbNoProxyActionPerformed(evt);
        }
    });

    txtProxyPassword.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyPassword}"), txtProxyPassword,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel3.setText("Username ");

    txtProxyUsername.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyUsername}"), txtProxyUsername,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    btnSaveProxyConfig.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnSaveProxyConfig.setText("Save");
    btnSaveProxyConfig.setHorizontalTextPosition(SwingConstants.CENTER);
    btnSaveProxyConfig.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnSaveProxyConfig.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveProxyConfigActionPerformed(evt);
        }
    });

    jLabel1.setText("Proxy Host");

    jLabel4.setText("Password");

    txtProxyHost.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyHost}"), txtProxyHost,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    checkProxyNeedAuth.setText("Proxy Need Authentication");

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${bUseProxyAuth}"), checkProxyNeedAuth,
            org.jdesktop.beansbinding.BeanProperty.create("selected"));
    bindingGroup.addBinding(binding);

    checkProxyNeedAuth.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkProxyNeedAuthActionPerformed(evt);
        }
    });

    GroupLayout jPanel12Layout = new GroupLayout(jPanel12);
    jPanel12.setLayout(jPanel12Layout);
    jPanel12Layout.setHorizontalGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup().addContainerGap().addGroup(jPanel12Layout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel12Layout.createSequentialGroup().addComponent(rbNoProxy)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(rbUseProxy))
                    .addGroup(jPanel12Layout.createSequentialGroup().addGroup(jPanel12Layout
                            .createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3).addComponent(jLabel4))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                    .addComponent(txtProxyPort, GroupLayout.PREFERRED_SIZE, 105,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtProxyHost, GroupLayout.PREFERRED_SIZE, 297,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel12Layout
                                            .createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(txtProxyPassword, GroupLayout.Alignment.LEADING)
                                            .addComponent(txtProxyUsername, GroupLayout.Alignment.LEADING,
                                                    GroupLayout.PREFERRED_SIZE, 227,
                                                    GroupLayout.PREFERRED_SIZE))))
                    .addComponent(checkProxyNeedAuth).addComponent(btnSaveProxyConfig,
                            GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));
    jPanel12Layout.setVerticalGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(rbNoProxy).addComponent(rbUseProxy))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(txtProxyHost, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2).addComponent(txtProxyPort, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addGap(4, 4, 4).addComponent(checkProxyNeedAuth)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(txtProxyUsername, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(txtProxyPassword, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSaveProxyConfig)
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(
                    jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel12, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(286, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(11, 11, 11)
                    .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel12, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(165, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Proxy Connection", jPanel1);

    jPanel2.setBorder(BorderFactory.createEtchedBorder());

    jPanel11.setBackground(Color.white);
    jPanel11.setBorder(BorderFactory.createEtchedBorder());

    jLabel35.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel35.setText("the application is trigger to open a folder.");

    jLabel30.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel30.setText("Info :");

    jLabel33.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel33.setText("application downloading stuff from the internet.");

    jLabel32.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel32.setText("Default Download Path  is the default folder location when the ");

    jLabel31.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel31.setText("This is the set of configuration will be used by this application.");

    jLabel34.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel34.setText("Default Folder Viewer is the default of computer programs when ");

    GroupLayout jPanel11Layout = new GroupLayout(jPanel11);
    jPanel11.setLayout(jPanel11Layout);
    jPanel11Layout.setHorizontalGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel30).addComponent(jLabel31).addComponent(jLabel32)
                            .addComponent(jLabel33).addComponent(jLabel34).addComponent(jLabel35))
                    .addContainerGap()));
    jPanel11Layout.setVerticalGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap().addComponent(jLabel30)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel31)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel32)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel33)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel34)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel35)
                    .addContainerGap()));

    jPanel14.setBorder(BorderFactory.createEtchedBorder());

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${defaultFolderViewer}"), txtDefaultFolderPath1,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel6.setText("Default Download Path");

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${defaultDownloadPath}"), txtDefaultFolderPath,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel7.setText("Default Folder Viewer");

    btnChooseFolder.setText("Change");
    btnChooseFolder.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnChooseFolderActionPerformed(evt);
        }
    });

    btnSaveAppConfig.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnSaveAppConfig.setText("Save");
    btnSaveAppConfig.setHorizontalTextPosition(SwingConstants.CENTER);
    btnSaveAppConfig.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnSaveAppConfig.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveAppConfigActionPerformed(evt);
        }
    });

    GroupLayout jPanel14Layout = new GroupLayout(jPanel14);
    jPanel14.setLayout(jPanel14Layout);
    jPanel14Layout.setHorizontalGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup().addContainerGap().addGroup(jPanel14Layout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                            .addComponent(jLabel7, GroupLayout.PREFERRED_SIZE, 161, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txtDefaultFolderPath1, GroupLayout.PREFERRED_SIZE, 258,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                            .addComponent(jLabel6, GroupLayout.PREFERRED_SIZE, 161, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txtDefaultFolderPath, GroupLayout.PREFERRED_SIZE, 346,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btnChooseFolder))
                    .addComponent(btnSaveAppConfig, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));
    jPanel14Layout.setVerticalGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(txtDefaultFolderPath, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnChooseFolder))
                    .addGap(4, 4, 4)
                    .addGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7).addComponent(txtDefaultFolderPath1,
                                    GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(btnSaveAppConfig).addContainerGap()));

    GroupLayout jPanel2Layout = new GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout
            .setHorizontalGroup(
                    jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel14, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel11, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel11, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel14, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap(285, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Application Config", jPanel2);

    jPanel9.setBackground(Color.white);
    jPanel9.setBorder(BorderFactory.createEtchedBorder());

    jLabel18.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel18.setText("Info :");

    jLabel23.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel23.setText("make the application processing faster.");

    jLabel19.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel19.setText("Cache Info contains a summary of how much space in hard drive");

    jLabel21.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel21.setText("hard drive space by this application, but if the application need to");

    jLabel20.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel20.setText("used by this application. Deleting cache will reduce the usage of");

    jLabel22.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel22.setText("fetch the data from internet, this cache will be used in order to");

    GroupLayout jPanel9Layout = new GroupLayout(jPanel9);
    jPanel9.setLayout(jPanel9Layout);
    jPanel9Layout.setHorizontalGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel18).addComponent(jLabel19).addComponent(jLabel20)
                            .addComponent(jLabel21).addComponent(jLabel22).addComponent(jLabel23))
                    .addContainerGap()));
    jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap().addComponent(jLabel18)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel19)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel20)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel21)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel22)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel23)
                    .addContainerGap()));

    jPanel13.setBorder(BorderFactory.createEtchedBorder());

    jLabel8.setText("Total Cache File Size");

    btnOpenOtherCacheFolder.setIcon(new ImageIcon(getClass().getResource("/icons/folder_open.png"))); // NOI18N
    btnOpenOtherCacheFolder.setText("Open Dir");
    btnOpenOtherCacheFolder.setHorizontalTextPosition(SwingConstants.CENTER);
    btnOpenOtherCacheFolder.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnOpenOtherCacheFolder.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnOpenOtherCacheFolderActionPerformed(evt);
        }
    });

    btnDeleteCache.setIcon(new ImageIcon(getClass().getResource("/icons/cross2.png"))); // NOI18N
    btnDeleteCache.setText("Delete Cache");
    btnDeleteCache.setHorizontalTextPosition(SwingConstants.CENTER);
    btnDeleteCache.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnDeleteCache.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDeleteCacheActionPerformed(evt);
        }
    });

    jLabel9.setText("Total Cache File");

    txtTotalFileSize1.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${cacheFile.fileListSize}"), txtTotalFileSize1,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    txtTotalFileSize.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${cacheFile.totalFolderSize}"), txtTotalFileSize,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    GroupLayout jPanel13Layout = new GroupLayout(jPanel13);
    jPanel13.setLayout(jPanel13Layout);
    jPanel13Layout.setHorizontalGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8).addComponent(jLabel9).addComponent(btnDeleteCache))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txtTotalFileSize1, GroupLayout.Alignment.LEADING)
                            .addComponent(btnOpenOtherCacheFolder, GroupLayout.Alignment.LEADING,
                                    GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)
                            .addComponent(txtTotalFileSize))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel13Layout.setVerticalGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8).addComponent(txtTotalFileSize, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9).addComponent(txtTotalFileSize1, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(btnDeleteCache, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(btnOpenOtherCacheFolder))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    GroupLayout jPanel7Layout = new GroupLayout(jPanel7);
    jPanel7.setLayout(jPanel7Layout);
    jPanel7Layout.setHorizontalGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel13, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel9,
                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(443, Short.MAX_VALUE)));
    jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel9, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel13, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap(289, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Cache Info", jPanel7);

    jPanel5.setBorder(BorderFactory.createEtchedBorder());

    txtTotalLogSize.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${logFile.totalFolderSize}"), txtTotalLogSize,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel11.setText("Total File on Log Folder");

    txtTotalLog.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${logFile.fileListSize}"), txtTotalLog,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    btnCleanLog.setIcon(new ImageIcon(getClass().getResource("/icons/cross2.png"))); // NOI18N
    btnCleanLog.setText("Clean Log File");
    btnCleanLog.setHorizontalTextPosition(SwingConstants.CENTER);
    btnCleanLog.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnCleanLog.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCleanLogActionPerformed(evt);
        }
    });

    jLabel13.setText("Total Size on Log Folder ");

    GroupLayout jPanel5Layout = new GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                            .addComponent(btnCleanLog, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel13).addComponent(jLabel11))
                                    .addGap(18, 18, 18)
                                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                            .addComponent(txtTotalLog, GroupLayout.PREFERRED_SIZE, 66,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(txtTotalLogSize, GroupLayout.PREFERRED_SIZE, 123,
                                                    GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap(22, Short.MAX_VALUE)));
    jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(txtTotalLog, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel11))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13).addComponent(txtTotalLogSize, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(btnCleanLog, GroupLayout.PREFERRED_SIZE, 50, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    jPanel6.setBorder(BorderFactory.createEtchedBorder());

    jLabel12.setText("Log File Data :");

    txtLogContent.setEditable(false);
    txtLogContent.setColumns(20);
    txtLogContent.setLineWrap(true);
    txtLogContent.setRows(5);
    txtLogContent.setWrapStyleWord(true);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${logFileData}"), txtLogContent,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jScrollPane1.setViewportView(txtLogContent);

    GroupLayout jPanel6Layout = new GroupLayout(jPanel6);
    jPanel6.setLayout(jPanel6Layout);
    jPanel6Layout.setHorizontalGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 724, Short.MAX_VALUE)
                            .addGroup(jPanel6Layout.createSequentialGroup().addComponent(jLabel12).addGap(0, 0,
                                    Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel6Layout
            .setVerticalGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap().addComponent(jLabel12)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jScrollPane1,
                                    GroupLayout.PREFERRED_SIZE, 339, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));

    jPanel8.setBackground(Color.white);
    jPanel8.setBorder(BorderFactory.createEtchedBorder());

    jLabel17.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel17.setText("application use it as a log tracker.");

    jLabel16.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel16.setText("These 2 log files cannot be delete, because the");

    jLabel15.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel15.setText("Minimal log files is 2 files.");

    jLabel14.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel14.setText("Info :");

    GroupLayout jPanel8Layout = new GroupLayout(jPanel8);
    jPanel8.setLayout(jPanel8Layout);
    jPanel8Layout.setHorizontalGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel14).addComponent(jLabel15).addComponent(jLabel16)
                            .addComponent(jLabel17))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap().addComponent(jLabel14)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel15)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel16)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel17)
                    .addContainerGap()));

    GroupLayout jPanel3Layout = new GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(
            GroupLayout.Alignment.TRAILING,
            jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel5, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel8, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel6, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addGap(20, 20, 20)
                    .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addComponent(jPanel5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(41, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Log Monitor", jPanel3);

    jPanel15.setBorder(BorderFactory.createEtchedBorder());

    txtAppLookAndFeel.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${defaultLookAndFeel}"), txtAppLookAndFeel,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel10.setText("Look And Feel ");

    btnSaveLF.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnSaveLF.setText("Save");
    btnSaveLF.setHorizontalTextPosition(SwingConstants.CENTER);
    btnSaveLF.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnSaveLF.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveLFActionPerformed(evt);
        }
    });

    btnSelectLF.setText("Change Look and Feel");
    btnSelectLF.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSelectLFActionPerformed(evt);
        }
    });

    GroupLayout jPanel15Layout = new GroupLayout(jPanel15);
    jPanel15.setLayout(jPanel15Layout);
    jPanel15Layout.setHorizontalGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup().addContainerGap().addComponent(jLabel10)
                    .addGap(4, 4, 4)
                    .addGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(btnSaveLF, GroupLayout.PREFERRED_SIZE, 90, GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtAppLookAndFeel, GroupLayout.PREFERRED_SIZE, 395,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnSelectLF, GroupLayout.PREFERRED_SIZE, 176,
                                    GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel15Layout.setVerticalGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10).addComponent(txtAppLookAndFeel, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSelectLF)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSaveLF)
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jPanel16.setBackground(Color.white);
    jPanel16.setBorder(BorderFactory.createEtchedBorder());

    jLabel41.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel41.setText("to be restarted.");

    jLabel36.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel36.setText("Info :");

    jLabel40.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel40.setText("System. Changing Look and Feel requires application");

    jLabel37.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel37.setText("Changing the Look and Feel means changing this");

    jLabel38.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel38.setText("application theme, the theme provided by it's installed");

    jLabel39.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel39.setText("Look and Feel class in the Java Runtime Environment");

    GroupLayout jPanel16Layout = new GroupLayout(jPanel16);
    jPanel16.setLayout(jPanel16Layout);
    jPanel16Layout.setHorizontalGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel36).addComponent(jLabel37).addComponent(jLabel38)
                            .addComponent(jLabel39).addComponent(jLabel40).addComponent(jLabel41))
                    .addContainerGap()));
    jPanel16Layout.setVerticalGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup().addContainerGap().addComponent(jLabel36)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel37)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel38)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel39)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel40)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel41)
                    .addContainerGap()));

    GroupLayout jPanel4Layout = new GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout
            .setHorizontalGroup(
                    jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel15, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel16, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(261, Short.MAX_VALUE)));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel16, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel15, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap(289, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Look And Feel", jPanel4);

    jLabel5.setFont(new Font("DejaVu Sans", 1, 18)); // NOI18N
    jLabel5.setHorizontalAlignment(SwingConstants.CENTER);
    jLabel5.setText("System Configuration");

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1).addComponent(jLabel5, GroupLayout.Alignment.TRAILING,
                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addComponent(jLabel5)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jTabbedPane1)));

    bindingGroup.bind();
}

From source file:edu.ku.brc.ui.CustomDialog.java

/**
 * @param title the title of the virtual titlebar
 *///from   www  .java2  s  .c om
public void setCustomTitleBar(final String title) {
    setUndecorated(true);

    titleBarLabel = new GradiantLabel(title, SwingConstants.CENTER);

    borderColor = SystemColor.windowBorder;
    Color textColor = SystemColor.activeCaptionText;

    if (UIHelper.isLinux()) {
        borderColor = SystemColor.activeCaptionBorder;
        textColor = SystemColor.activeCaptionText;
        if (borderColor.getRed() == borderColor.getGreen() && borderColor.getGreen() == borderColor.getBlue()) {
            borderColor = new Color(132, 170, 216);
            textColor = Color.WHITE;
        }

    } else if (UIHelper.isWindows()) {
        borderColor = (Color) Toolkit.getDefaultToolkit().getDesktopProperty("win.frame.activeCaptionColor");
        textColor = (Color) Toolkit.getDefaultToolkit().getDesktopProperty("win.frame.captionTextColor");
    }

    titleBarLabel.setTextColor(textColor);
    titleBarLabel.setBGBaseColor(borderColor);
    titleBarLabel.setGradiants(UIHelper.makeLighter(borderColor, 0.2), UIHelper.makeDarker(borderColor, 0.2));
}

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

SampleEntryPanel(CurationData cd, IntFunction<Trait> traitProvider, TypedSampleMeasurementTableModel tsm,
        JTable table, TsmCellRenderer tsmCellRenderer, JToggleButton showPpiOption,
        Closure<Void> refreshFieldLayoutView,
        BiConsumer<Comparable<?>, List<CurationCellValue>> showChangedValue, SampleType[] sampleTypes) {
    this.curationData = cd;
    this.traitProvider = traitProvider;
    this.typedSampleTableModel = tsm;
    this.typedSampleTable = table;

    this.showPpiOption = showPpiOption;

    this.initialTableRowHeight = typedSampleTable.getRowHeight();
    this.tsmCellRenderer = tsmCellRenderer;
    this.refreshFieldLayoutView = refreshFieldLayoutView;
    this.showChangedValue = showChangedValue;

    List<SampleType> list = new ArrayList<>();
    list.add(NO_SAMPLE_TYPE);/*from www .  j  a  v  a2 s  .com*/
    for (SampleType st : sampleTypes) {
        list.add(st);
        sampleTypeById.put(st.getTypeId(), st);
    }

    sampleTypeCombo = new JComboBox<SampleType>(list.toArray(new SampleType[list.size()]));

    typedSampleTableModel.addTableModelListener(new TableModelListener() {
        @Override
        public void tableChanged(TableModelEvent e) {
            if (TableModelEvent.HEADER_ROW == e.getFirstRow()) {
                typedSampleTable.setAutoCreateColumnsFromModel(true);
                everSetData = false;
            }
        }
    });

    showStatsAction.putValue(Action.SHORT_DESCRIPTION, Vocab.TOOLTIP_STATS_FOR_KDSMART_SAMPLES());
    showStatsOption.setFont(showStatsOption.getFont().deriveFont(Font.BOLD));
    showStatsOption.setPreferredSize(new Dimension(30, 30));

    JLabel helpPanel = new JLabel();
    helpPanel.setHorizontalAlignment(JLabel.CENTER);
    String html = "<HTML>Either enter a value or select<br>a <i>Source</i> for <b>Value From:</b>";
    if (shouldShowSampleType(sampleTypes)) {
        html += "<BR>You may also select a <i>Sample Type</i> if it is relevant.";
    }
    helpPanel.setText(html);

    singleOrMultiCardPanel.add(helpPanel, CARD_SINGLE);
    singleOrMultiCardPanel.add(applyToPanel, CARD_MULTI);
    //        singleOrMultiCardPanel.add(multiCellControlsPanel, CARD_MULTI);

    validationMessage.setBorder(new LineBorder(Color.LIGHT_GRAY));
    validationMessage.setForeground(Color.RED);
    validationMessage.setBackground(new JLabel().getBackground());
    validationMessage.setHorizontalAlignment(SwingConstants.CENTER);
    //      validationMessage.setEditable(false);
    Box setButtons = Box.createHorizontalBox();
    setButtons.add(new JButton(deleteAction));
    setButtons.add(new JButton(notApplicableAction));
    setButtons.add(new JButton(missingAction));
    setButtons.add(new JButton(setValueAction));

    deleteAction.putValue(Action.SHORT_DESCRIPTION, Vocab.TOOLTIP_SET_UNSET());
    notApplicableAction.putValue(Action.SHORT_DESCRIPTION, Vocab.TOOLTIP_SET_NA());
    missingAction.putValue(Action.SHORT_DESCRIPTION, Vocab.TOOLTIP_SET_MISSING());
    setValueAction.putValue(Action.SHORT_DESCRIPTION, Vocab.TOOLTIP_SET_VALUE());

    Box sampleType = Box.createHorizontalBox();
    sampleType.add(new JLabel(Vocab.LABEL_SAMPLE_TYPE()));
    sampleType.add(sampleTypeCombo);

    statisticsControls = generateStatControls();

    setBorder(new TitledBorder(new LineBorder(Color.GREEN.darker().darker()), "Sample Entry Panel"));
    GBH gbh = new GBH(this);
    int y = 0;

    gbh.add(0, y, 2, 1, GBH.HORZ, 1, 1, GBH.CENTER, statisticsControls);
    ++y;

    if (shouldShowSampleType(sampleTypes)) {
        sampleType.setBorder(new LineBorder(Color.RED));
        sampleType.setToolTipText("DEVELOPER MODE: sampleType is possible hack for accept/suppress");
        gbh.add(0, y, 2, 1, GBH.HORZ, 1, 1, GBH.CENTER, sampleType);
        ++y;
    }

    sampleSourceControls = Box.createHorizontalBox();
    sampleSourceControls.add(new JLabel(Vocab.PROMPT_VALUES_FROM()));
    //        sampleSourceControls.add(new JSeparator(JSeparator.VERTICAL));
    sampleSourceControls.add(sampleSourceComboBox);
    sampleSourceControls.add(Box.createHorizontalGlue());
    sampleSourceComboBox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            updateSetValueAction();
        }
    });

    gbh.add(0, y, 2, 1, GBH.HORZ, 1, 1, GBH.CENTER, sampleSourceControls);
    ++y;

    gbh.add(0, y, 2, 1, GBH.HORZ, 1, 1, GBH.CENTER, valueDescription);
    ++y;

    gbh.add(0, y, 1, 1, GBH.NONE, 1, 1, GBH.WEST, showStatsOption);
    gbh.add(1, y, 1, 1, GBH.HORZ, 2, 1, GBH.CENTER, sampleValueTextField);
    ++y;

    gbh.add(0, y, 2, 1, GBH.NONE, 1, 1, GBH.CENTER, setButtons);
    ++y;

    gbh.add(0, y, 2, 1, GBH.HORZ, 2, 1, GBH.CENTER, validationMessage);
    ++y;

    gbh.add(0, y, 2, 1, GBH.HORZ, 2, 0, GBH.CENTER, singleOrMultiCardPanel);
    ++y;

    deleteAction.setEnabled(false);
    sampleSourceControls.setVisible(false);

    sampleValueTextField.setGrayWhenDisabled(true);
    sampleValueTextField.addActionListener(enterKeyListener);

    sampleValueTextField.getDocument().addDocumentListener(new DocumentListener() {
        @Override
        public void removeUpdate(DocumentEvent e) {
            updateSetValueAction();
        }

        @Override
        public void insertUpdate(DocumentEvent e) {
            updateSetValueAction();
        }

        @Override
        public void changedUpdate(DocumentEvent e) {
            updateSetValueAction();
        }
    });

    setValueAction.setEnabled(false);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

From source file:eu.ggnet.dwoss.redtape.document.DocumentUpdateView.java

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

    jLabel1 = new javax.swing.JLabel();
    unitInputField = new javax.swing.JTextField();
    addUnitButton = new javax.swing.JButton();
    recentCustomerLabel = new javax.swing.JLabel();
    addProductBatchButton = new javax.swing.JButton();
    addServiceButton = new javax.swing.JButton();
    jSeparator1 = new javax.swing.JSeparator();
    moveUpButton = new javax.swing.JButton();
    moveDownButton = new javax.swing.JButton();
    removePositionButton = new javax.swing.JButton();
    addCommentButton = new javax.swing.JButton();
    jLabel3 = new javax.swing.JLabel();
    shippingCostButton = new javax.swing.JButton();
    paymentMethodLabel = new javax.swing.JLabel();
    editInvoiceAddressButton = new javax.swing.JButton();
    editShippingAddress = new javax.swing.JButton();
    resetAddressesButton = new javax.swing.JButton();
    jScrollPane3 = new javax.swing.JScrollPane();
    addressesArea = new javax.swing.JTextPane();
    jSeparator2 = new javax.swing.JSeparator();
    positionPanelFx = new javax.swing.JPanel();
    convertToWarrantyPositionButton = new javax.swing.JButton();

    setPreferredSize(new java.awt.Dimension(800, 600));
    setLayout(new java.awt.GridBagLayout());

    jLabel1.setText("Aktueller Kunde:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    add(jLabel1, gridBagConstraints);

    unitInputField.setToolTipText("<html>SopoNr. eingeben<br />-Enter fr schnelle eingabe verwenden</html>");
    unitInputField.setMinimumSize(new java.awt.Dimension(100, 25));
    unitInputField.setPreferredSize(new java.awt.Dimension(100, 25));
    unitInputField.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addUnitAction(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 0.3;
    add(unitInputField, gridBagConstraints);

    addUnitButton.setToolTipText("Sopo Gert hinzufgen");
    addUnitButton.setMaximumSize(new java.awt.Dimension(2147483647, 46));
    addUnitButton.setMinimumSize(new java.awt.Dimension(40, 40));
    addUnitButton.setPreferredSize(new java.awt.Dimension(40, 40));
    addUnitButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addUnitAction(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
    add(addUnitButton, gridBagConstraints);

    recentCustomerLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    recentCustomerLabel.setText("Derzeit kein Kunde gewhlt.");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    add(recentCustomerLabel, gridBagConstraints);

    addProductBatchButton.setText("<html>Neuware<br>hinzufgen</html>");
    addProductBatchButton.setMaximumSize(new java.awt.Dimension(120, 45));
    addProductBatchButton.setMinimumSize(new java.awt.Dimension(120, 45));
    addProductBatchButton.setPreferredSize(new java.awt.Dimension(120, 45));
    addProductBatchButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addNonUnitPosition(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    add(addProductBatchButton, gridBagConstraints);

    addServiceButton.setText("<html>Dienstleistung<br />Kleinteil, Gebhr");
    addServiceButton.setRolloverEnabled(false);
    addServiceButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addNonUnitPosition(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    add(addServiceButton, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(20, 0, 5, 0);
    add(jSeparator1, gridBagConstraints);

    moveUpButton.setToolTipText("Position hoch schieben");
    moveUpButton.setMaximumSize(new java.awt.Dimension(40, 28));
    moveUpButton.setMinimumSize(new java.awt.Dimension(40, 28));
    moveUpButton.setPreferredSize(new java.awt.Dimension(40, 28));
    moveUpButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            changePositionOrderAction(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LAST_LINE_END;
    add(moveUpButton, gridBagConstraints);

    moveDownButton.setToolTipText("Position runter schieben");
    moveDownButton.setMaximumSize(new java.awt.Dimension(40, 28));
    moveDownButton.setMinimumSize(new java.awt.Dimension(40, 28));
    moveDownButton.setPreferredSize(new java.awt.Dimension(40, 28));
    moveDownButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            changePositionOrderAction(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_END;
    add(moveDownButton, gridBagConstraints);

    removePositionButton.setToolTipText("Position entfernen");
    removePositionButton.setMaximumSize(new java.awt.Dimension(40, 40));
    removePositionButton.setMinimumSize(new java.awt.Dimension(40, 40));
    removePositionButton.setPreferredSize(new java.awt.Dimension(40, 40));
    removePositionButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            removePositionAction(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    add(removePositionButton, gridBagConstraints);

    addCommentButton.setText("Kommentar");
    addCommentButton.setPreferredSize(new java.awt.Dimension(99, 42));
    addCommentButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addNonUnitPosition(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    add(addCommentButton, gridBagConstraints);

    jLabel3.setText("SopoNr:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    add(jLabel3, gridBagConstraints);

    shippingCostButton.setText("Versandkosten");
    shippingCostButton.setPreferredSize(new java.awt.Dimension(123, 42));
    shippingCostButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addNonUnitPosition(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    add(shippingCostButton, gridBagConstraints);

    paymentMethodLabel.setText("Zahlungsmodalitt:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    add(paymentMethodLabel, gridBagConstraints);

    editInvoiceAddressButton.setText("<html>Rechnungsadresse<br />bearbeiten</html>");
    editInvoiceAddressButton.setToolTipText("");
    editInvoiceAddressButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    editInvoiceAddressButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            editInvoiceAddressButtonActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 12;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    add(editInvoiceAddressButton, gridBagConstraints);

    editShippingAddress.setText("<html>Lieferungsadresse<br />bearbeiten</html>");
    editShippingAddress.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            editShippingAddressActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 13;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    add(editShippingAddress, gridBagConstraints);

    resetAddressesButton.setText("Adressen zurcksetzen");
    resetAddressesButton.setPreferredSize(new java.awt.Dimension(180, 42));
    resetAddressesButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            resetAddressesButtonActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 14;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    add(resetAddressesButton, gridBagConstraints);

    addressesArea.setEditable(false);
    addressesArea.setPreferredSize(new java.awt.Dimension(12, 80));
    jScrollPane3.setViewportView(addressesArea);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 15;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.1;
    gridBagConstraints.weighty = 0.1;
    add(jScrollPane3, gridBagConstraints);

    jSeparator2.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(20, 0, 5, 0);
    add(jSeparator2, gridBagConstraints);

    positionPanelFx.setLayout(new java.awt.BorderLayout());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = 16;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 3.0;
    add(positionPanelFx, gridBagConstraints);

    convertToWarrantyPositionButton.setToolTipText("Garantie manuell erweitern");
    convertToWarrantyPositionButton.setMaximumSize(new java.awt.Dimension(40, 40));
    convertToWarrantyPositionButton.setMinimumSize(new java.awt.Dimension(40, 40));
    convertToWarrantyPositionButton.setPreferredSize(new java.awt.Dimension(40, 40));
    convertToWarrantyPositionButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            convertToWarrantyPositionButtonActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    add(convertToWarrantyPositionButton, gridBagConstraints);
}

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

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

    jXNotePanel = new org.jdesktop.swingx.JXPanel();
    jNoteTabbedPane = new javax.swing.JTabbedPane();
    jNewSetPanel = new javax.swing.JPanel();
    jLabel4 = new javax.swing.JLabel();
    jxSearchPane = new org.jdesktop.swingx.JXPanel();
    jXPanel3 = new org.jdesktop.swingx.JXPanel();
    jButton16 = new javax.swing.JButton();
    jTextField1 = new javax.swing.JTextField();
    jLabel21 = new javax.swing.JLabel();
    jFilterRows = new javax.swing.JCheckBox();
    jFilterCaseSensitive = new javax.swing.JCheckBox();
    jExportFormatDialog = new javax.swing.JDialog();
    bBPanel1 = new de.tor.tribes.ui.panels.BBPanel();
    jComboBox1 = new javax.swing.JComboBox();
    jLabel5 = new javax.swing.JLabel();
    jScrollPane4 = new javax.swing.JScrollPane();
    jTextPane1 = new javax.swing.JTextPane();
    jButton4 = new javax.swing.JButton();
    jButton5 = new javax.swing.JButton();
    jAlwaysOnTopBox = new javax.swing.JCheckBox();
    jNotesPanel = new javax.swing.JPanel();
    capabilityInfoPanel1 = new de.tor.tribes.ui.components.CapabilityInfoPanel();

    jXNotePanel.setPreferredSize(new java.awt.Dimension(500, 400));
    jXNotePanel.setLayout(new java.awt.BorderLayout());
    jXNotePanel.add(jNoteTabbedPane, java.awt.BorderLayout.CENTER);

    jNewSetPanel.setOpaque(false);
    jNewSetPanel.setLayout(new java.awt.BorderLayout());

    jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/document_new_24x24.png"))); // NOI18N
    jLabel4.setToolTipText("Leeres Notizset erstellen");
    jLabel4.setMaximumSize(new java.awt.Dimension(40, 40));
    jLabel4.setMinimumSize(new java.awt.Dimension(40, 40));
    jLabel4.setOpaque(true);
    jLabel4.setPreferredSize(new java.awt.Dimension(40, 40));
    jLabel4.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            fireEnterEvent(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            fireMouseExitEvent(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            fireCreateNoteSetEvent(evt);
        }
    });
    jNewSetPanel.add(jLabel4, java.awt.BorderLayout.CENTER);

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

    jXPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jXPanel3.setInheritAlpha(false);

    jButton16.setText("Anwenden");
    jButton16.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseReleased(java.awt.event.MouseEvent evt) {
            jButton16fireHideGlassPaneEvent(evt);
        }
    });

    jTextField1.addCaretListener(new javax.swing.event.CaretListener() {
        public void caretUpdate(javax.swing.event.CaretEvent evt) {
            jTextField1fireHighlightEvent(evt);
        }
    });

    jLabel21.setText("Suchbegriff");

    jFilterRows.setText("Nur gefilterte Zeilen anzeigen");
    jFilterRows.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            jFilterRowsfireUpdateFilterEvent(evt);
        }
    });

    jFilterCaseSensitive.setText("Gro-/Kleinschreibung beachten");
    jFilterCaseSensitive.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            jFilterCaseSensitivefireUpdateFilterEvent(evt);
        }
    });

    javax.swing.GroupLayout jXPanel3Layout = new javax.swing.GroupLayout(jXPanel3);
    jXPanel3.setLayout(jXPanel3Layout);
    jXPanel3Layout.setHorizontalGroup(jXPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel3Layout.createSequentialGroup()
                    .addContainerGap().addComponent(jLabel21).addGap(18, 18, 18)
                    .addGroup(jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jXPanel3Layout.createSequentialGroup().addGap(176, 176, 176)
                                    .addGroup(jXPanel3Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addGroup(jXPanel3Layout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                    .addComponent(jFilterRows,
                                                            javax.swing.GroupLayout.Alignment.LEADING,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            Short.MAX_VALUE)
                                                    .addComponent(jFilterCaseSensitive,
                                                            javax.swing.GroupLayout.Alignment.LEADING,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            Short.MAX_VALUE))
                                            .addComponent(jButton16)))
                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 355,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jXPanel3Layout.setVerticalGroup(jXPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel3Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel21).addComponent(jTextField1,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jFilterCaseSensitive)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jFilterRows)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton16)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jxSearchPane.add(jXPanel3, new java.awt.GridBagConstraints());

    jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(
            new String[] { "Nicht gruppieren", "Gruppieren nach Drfern", "Gruppieren nach Notizsymbolen" }));

    jLabel5.setText("Gruppierung");

    jScrollPane4.setBorder(javax.swing.BorderFactory.createTitledBorder("Vorschau"));

    jTextPane1.setContentType("text/html"); // NOI18N
    jTextPane1.setEditable(false);
    jScrollPane4.setViewportView(jTextPane1);

    jButton4.setText("bernehmen");

    jButton5.setText("Abbrechen");

    javax.swing.GroupLayout jExportFormatDialogLayout = new javax.swing.GroupLayout(
            jExportFormatDialog.getContentPane());
    jExportFormatDialog.getContentPane().setLayout(jExportFormatDialogLayout);
    jExportFormatDialogLayout.setHorizontalGroup(jExportFormatDialogLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jExportFormatDialogLayout.createSequentialGroup().addContainerGap()
                    .addGroup(jExportFormatDialogLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jExportFormatDialogLayout.createSequentialGroup()
                                    .addGroup(jExportFormatDialogLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                    false)
                                            .addComponent(bBPanel1, javax.swing.GroupLayout.Alignment.LEADING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    jExportFormatDialogLayout.createSequentialGroup()
                                                            .addComponent(jLabel5)
                                                            .addPreferredGap(
                                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                            .addComponent(jComboBox1, 0,
                                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                    Short.MAX_VALUE)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 321,
                                            Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    jExportFormatDialogLayout.createSequentialGroup().addComponent(jButton5)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jButton4)))
                    .addContainerGap()));
    jExportFormatDialogLayout.setVerticalGroup(jExportFormatDialogLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jExportFormatDialogLayout.createSequentialGroup().addContainerGap()
                    .addGroup(jExportFormatDialogLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jExportFormatDialogLayout
                                    .createSequentialGroup()
                                    .addComponent(bBPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(jExportFormatDialogLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel5).addComponent(jComboBox1,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGap(18, 18, 18)
                    .addGroup(jExportFormatDialogLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton4).addComponent(jButton5))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    setTitle("Notizen");
    setMinimumSize(new java.awt.Dimension(500, 400));
    getContentPane().setLayout(new java.awt.GridBagLayout());

    jAlwaysOnTopBox.setText("Immer im Vordergrund");
    jAlwaysOnTopBox.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            fireAlwaysOnTopChangedEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    getContentPane().add(jAlwaysOnTopBox, gridBagConstraints);

    jNotesPanel.setBackground(new java.awt.Color(239, 235, 223));
    jNotesPanel.setPreferredSize(new java.awt.Dimension(500, 400));
    jNotesPanel.setLayout(new java.awt.BorderLayout());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 500;
    gridBagConstraints.ipady = 400;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jNotesPanel, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    getContentPane().add(capabilityInfoPanel1, gridBagConstraints);

    pack();
}

From source file:utybo.easypastebin.windows.MainWindow.java

/**
 * Creates the window//from ww  w.  j  a v a2 s.c  o  m
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
public MainWindow() {
    EasyPastebin.LOGGER.log("Initializing the window", SinkJLevel.INFO);
    setTitle("EasyPastebin");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 664, 431);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    contentPane.setLayout(new BorderLayout(0, 0));
    setContentPane(contentPane);

    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    contentPane.add(tabbedPane, BorderLayout.CENTER);

    JPanel main = new JPanel();
    tabbedPane.addTab("EasyPastebin", null, main, null);
    main.setLayout(null);

    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setBounds(62, 39, 312, 132);
    main.add(scrollPane);

    pasteContent = new JTextArea();
    pasteContent.setFont(new Font("Monospaced", Font.PLAIN, 11));
    pasteContent.setWrapStyleWord(true);
    pasteContent.setLineWrap(true);
    pasteContent.setToolTipText("Put your paste here!");
    scrollPane.setViewportView(pasteContent);

    JLabel titleLabel = new JLabel("Title :");
    titleLabel.setFont(new Font("Tahoma", Font.PLAIN, 12));
    titleLabel.setBounds(10, 11, 42, 21);
    main.add(titleLabel);

    pasteTitle = new JTextField();
    pasteTitle.setBounds(62, 12, 312, 20);
    main.add(pasteTitle);
    pasteTitle.setColumns(10);

    JLabel lblPaste = new JLabel("Paste :");
    lblPaste.setForeground(Color.RED);
    lblPaste.setFont(new Font("Tahoma", Font.PLAIN, 12));
    lblPaste.setBounds(10, 85, 53, 21);
    main.add(lblPaste);

    pasteExpireDate = new JComboBox();
    pasteExpireDate.setFont(new Font("Tahoma", Font.PLAIN, 12));
    pasteExpireDate.setModel(new DefaultComboBoxModel(EnumExpireDate.values()));
    pasteExpireDate.setBounds(468, 12, 155, 21);
    main.add(pasteExpireDate);

    JLabel lblExpireDate = new JLabel("Expire Date :");
    lblExpireDate.setFont(new Font("Tahoma", Font.PLAIN, 12));
    lblExpireDate.setBounds(384, 14, 81, 14);
    main.add(lblExpireDate);

    JLabel lblfieldsInRed = new JLabel("(Fields in red are required)");
    lblfieldsInRed.setBounds(72, 182, 302, 14);
    main.add(lblfieldsInRed);

    btnSubmit = new JButton("Submit!");
    btnSubmit.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent event) {
            EasyPastebin.LOGGER.log("Starting Submit script", SinkJLevel.INFO);
            btnSubmit.setEnabled(false);
            btnSubmit.setText("Please wait...");

            boolean success = true;
            String paste = pasteContent.getText();
            String title = pasteTitle.getText();
            EnumExpireDate expireDate = (EnumExpireDate) pasteExpireDate.getSelectedItem();

            if (paste.equals("") || paste.equals(" ") || paste.equals(null)) {
                pastebinUrl.setText("ERROR");
                JOptionPane.showMessageDialog(null, "You cannot send empty pastes!",
                        "Error while processing paste", JOptionPane.ERROR_MESSAGE);
            } else {
                try {
                    EasyPastebin.LOGGER.log("Setting options", SinkJLevel.INFO);
                    Map map = new HashMap<String, String>();
                    map.put("api_dev_key", HttpHelper.API_KEY);
                    map.put("api_option", "paste");
                    map.put("api_paste_code", paste);
                    if (!(expireDate.equals(null) || expireDate.equals(EnumExpireDate.NEVER)))
                        map.put("api_paste_expire_date", expireDate.getRawName());
                    if (!(title.equals("") || title.equals(" ") || title.equals(null)))
                        map.put("api_paste_name", title);

                    EasyPastebin.LOGGER.log("Sending paste", SinkJLevel.INFO);
                    String actionResult = HttpHelper.sendPost("http://pastebin.com/api/api_post.php", map)
                            .asString();
                    EasyPastebin.LOGGER.log("Paste sent, checking output", SinkJLevel.INFO);
                    // Exception handlers
                    if (actionResult.equals("Bad API request, invalid api_option")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Incorrect Pastebin option!", "Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, invalid api_dev_key")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Incorrect dev key! Try again with a more recent version!",
                                "Error", JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, IP blocked")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null, "Error while processing paste. Your IP is blocked!",
                                "Error", JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals(
                            "Bad API request, maximum number of 25 unlisted pastes for your free account")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                    }
                    if (actionResult.equals(
                            "Bad API request, maximum number of 10 private pastes for your free account")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                    }
                    if (actionResult.equals("Bad API request, api_paste_code was empty")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                    }
                    if (actionResult.equals("Bad API request, maximum paste file size exceeded")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Your paste is too big!", "Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, invalid api_expire_date")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Invalid expire date!", "Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, invalid api_paste_private")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Invalid privacy value!", "Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, invalid api_paste_format")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null, "Error while processing paste. Invalid format!",
                                "Error", JOptionPane.ERROR_MESSAGE);
                    }
                    // END

                    // Starting display stuff
                    if (success == false) {
                        EasyPastebin.LOGGER.log("Submit script failed : success == false", SinkJLevel.ERROR);
                        pastebinUrl.setText("ERROR");
                    }
                    if (success == true) {
                        EasyPastebin.LOGGER.log("Paste sent! Starting display script!", SinkJLevel.INFO);
                        pastebinUrl.setText(actionResult);
                        JOptionPane.showMessageDialog(null, "Paste successfully sent!", "Done!",
                                JOptionPane.INFORMATION_MESSAGE);
                        EasyPastebin.LOGGER.log("Display script finished! Paste URL is : " + actionResult,
                                SinkJLevel.INFO);
                    }

                } catch (ClientProtocolException e) {
                    EasyPastebin.LOGGER.log("Unexpected error! " + e, SinkJLevel.ERROR);
                    JOptionPane.showMessageDialog(null, "Error while processing paste : " + e, "Error",
                            JOptionPane.ERROR_MESSAGE);
                    e.printStackTrace();
                } catch (IOException e) {
                    EasyPastebin.LOGGER.log("Unexpected error! " + e, SinkJLevel.ERROR);
                    JOptionPane.showMessageDialog(null, "Error while processing paste : " + e, "Error",
                            JOptionPane.ERROR_MESSAGE);
                    e.printStackTrace();
                } catch (MissingParamException e) {
                    EasyPastebin.LOGGER.log("Unexpected error! " + e, SinkJLevel.ERROR);
                    JOptionPane.showMessageDialog(null, "Error while processing paste : " + e
                            + "! This is a severe programming error! Try again with a more recent version!",
                            "Error", JOptionPane.ERROR_MESSAGE);
                    e.printStackTrace();
                }
            }

            EasyPastebin.LOGGER.log("Re-enabling the Submit button ", SinkJLevel.INFO);
            btnSubmit.setEnabled(true);
            btnSubmit.setText("Submit another paste!");
            EasyPastebin.LOGGER.log("Finished submit script! Success : " + success, SinkJLevel.INFO);
        }
    });
    btnSubmit.setBounds(386, 45, 237, 44);
    main.add(btnSubmit);

    pastebinUrl = new JTextField();
    pastebinUrl.setText("The paste's URL will be shown here!");
    pastebinUrl.setEditable(false);
    pastebinUrl.setBounds(384, 198, 239, 32);
    main.add(pastebinUrl);
    pastebinUrl.setColumns(10);

    JPanel about = new JPanel();
    tabbedPane.addTab("About", null, about, null);

    JLabel label = new JLabel("EasyPastebin");
    label.setBounds(12, 12, 623, 39);
    label.setHorizontalAlignment(SwingConstants.CENTER);
    label.setFont(new Font("Dialog", Font.PLAIN, 25));

    JLabel lblTheEasiestWay = new JLabel("The easiest way to use Pastebin.com");
    lblTheEasiestWay.setBounds(12, 63, 623, 32);
    lblTheEasiestWay.setFont(new Font("Dialog", Font.PLAIN, 16));
    lblTheEasiestWay.setHorizontalAlignment(SwingConstants.CENTER);
    about.setLayout(null);
    about.add(label);
    about.add(lblTheEasiestWay);

    JButton btnForkM = new JButton("Fork me on Github!");
    btnForkM.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            goToUrl("https://github.com/utybo/EasyPastebin");
        }
    });
    btnForkM.setBounds(12, 117, 623, 25);
    about.add(btnForkM);

    JButton btnCheckOutUtybos = new JButton("Check out utybo's projects!");
    btnCheckOutUtybos.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            goToUrl("http://utybo.github.io/");
        }
    });
    btnCheckOutUtybos.setBounds(12, 154, 623, 25);
    about.add(btnCheckOutUtybos);

    JButton btnGoToPastebincom = new JButton("Go to Pastebin.com!");
    btnGoToPastebincom.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            goToUrl("http://www.pastebin.com");
        }
    });
    btnGoToPastebincom.setBounds(12, 191, 623, 25);
    about.add(btnGoToPastebincom);

    JLabel lblcUtybo = new JLabel(
            "This soft was made by utybo. It uses Apache's libraries for the interaction with Pastebin's API");
    lblcUtybo.setFont(new Font("Dialog", Font.PLAIN, 10));
    lblcUtybo.setHorizontalAlignment(SwingConstants.CENTER);
    lblcUtybo.setBounds(12, 324, 623, 15);
    about.add(lblcUtybo);

    JLabel lblClickMeTo = new JLabel("Click me to go to Apache's licence official website");
    lblClickMeTo.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
            goToUrl("http://www.apache.org/licenses/LICENSE-2.0");
        }
    });
    lblClickMeTo.setHorizontalAlignment(SwingConstants.CENTER);
    lblClickMeTo.setFont(new Font("Dialog", Font.PLAIN, 10));
    lblClickMeTo.setBounds(12, 342, 623, 15);
    about.add(lblClickMeTo);

    setVisible(true);

    EasyPastebin.LOGGER.log("Done!", SinkJLevel.INFO);
}

From source file:com.josescalia.tumblr.form.TumblrRssFavList.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  w w  .j av a  2s  . c om
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    labelValueListCellRenderer1 = new com.josescalia.tumblr.util.swing.LabelValueListCellRenderer();
    jPanel1 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    jComboBox1 = new javax.swing.JComboBox();
    txtSearchVal = new javax.swing.JTextField();
    btnFind = new javax.swing.JButton();
    panelForm = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    txtRssTitle = new javax.swing.JTextField();
    txtRssLink = new javax.swing.JTextField();
    jLabel2 = new javax.swing.JLabel();
    pnlButton = new javax.swing.JPanel();
    btnNew2 = new javax.swing.JButton();
    btnSave = new javax.swing.JButton();
    btnCancel = new javax.swing.JButton();
    btnEdit = new javax.swing.JButton();
    btnDelete = new javax.swing.JButton();

    jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty
            .create("${dataList}");
    org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings
            .createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
                    eLProperty, jTable1);
    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding
            .addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${title}"));
    columnBinding.setColumnName("Title");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${link}"));
    columnBinding.setColumnName("Link");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    bindingGroup.addBinding(jTableBinding);
    jTableBinding.bind();
    org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), jTable1,
            org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
    bindingGroup.addBinding(binding);

    jScrollPane1.setViewportView(jTable1);
    if (jTable1.getColumnModel().getColumnCount() > 0) {
        jTable1.getColumnModel().getColumn(0).setResizable(false);
        jTable1.getColumnModel().getColumn(0).setPreferredWidth(100);
        jTable1.getColumnModel().getColumn(1).setResizable(false);
        jTable1.getColumnModel().getColumn(1).setPreferredWidth(300);
    }

    jComboBox1.setModel(
            new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    jComboBox1.setRenderer(labelValueListCellRenderer1);

    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${filterList}");
    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings
            .createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
                    eLProperty, jComboBox1);
    bindingGroup.addBinding(jComboBoxBinding);
    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${filter}"), jComboBox1,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${filterText}"), txtSearchVal,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    btnFind.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/magnifier.png"))); // NOI18N
    btnFind.setText("Find");
    btnFind.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnFindActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                            jPanel1Layout.createSequentialGroup()
                                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 99,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(txtSearchVal, javax.swing.GroupLayout.PREFERRED_SIZE, 274,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(btnFind, javax.swing.GroupLayout.PREFERRED_SIZE, 96,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtSearchVal, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnFind))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
                    .addContainerGap()));

    panelForm.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    jLabel1.setText("Title");

    txtRssTitle.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${formBean.title}"), txtRssTitle,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    txtRssLink.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${formBean.link}"), txtRssLink,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel2.setText("Link");

    javax.swing.GroupLayout panelFormLayout = new javax.swing.GroupLayout(panelForm);
    panelForm.setLayout(panelFormLayout);
    panelFormLayout.setHorizontalGroup(panelFormLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelFormLayout.createSequentialGroup().addContainerGap()
                    .addGroup(panelFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(panelFormLayout.createSequentialGroup()
                                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(txtRssTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 243,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(191, 191, 191))
                            .addGroup(panelFormLayout.createSequentialGroup()
                                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(txtRssLink, javax.swing.GroupLayout.PREFERRED_SIZE, 434,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(39, Short.MAX_VALUE)));
    panelFormLayout.setVerticalGroup(panelFormLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelFormLayout.createSequentialGroup().addContainerGap().addGroup(panelFormLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(txtRssTitle, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(panelFormLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2).addComponent(txtRssLink,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    pnlButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    btnNew2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/add.png"))); // NOI18N
    btnNew2.setText("New");
    btnNew2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnNew2.setName("btnNew"); // NOI18N
    btnNew2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnNew2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnNew2ActionPerformed(evt);
        }
    });

    btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/save.png"))); // NOI18N
    btnSave.setText("Save");
    btnSave.setEnabled(false);
    btnSave.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnSave.setName("btnSave"); // NOI18N
    btnSave.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveActionPerformed(evt);
        }
    });

    btnCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/cancel.png"))); // NOI18N
    btnCancel.setText("Cancel");
    btnCancel.setEnabled(false);
    btnCancel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnCancel.setName("btnCancel"); // NOI18N
    btnCancel.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
        }
    });

    btnEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnEdit.setText("Edit");
    btnEdit.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnEdit.setName("btnEdit"); // NOI18N
    btnEdit.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnEdit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnEditActionPerformed(evt);
        }
    });

    btnDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/delete.png"))); // NOI18N
    btnDelete.setText("Delete");
    btnDelete.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnDelete.setName("btnDelete"); // NOI18N
    btnDelete.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnDelete.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDeleteActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout pnlButtonLayout = new javax.swing.GroupLayout(pnlButton);
    pnlButton.setLayout(pnlButtonLayout);
    pnlButtonLayout
            .setHorizontalGroup(pnlButtonLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlButtonLayout.createSequentialGroup().addContainerGap()
                            .addComponent(btnNew2, javax.swing.GroupLayout.PREFERRED_SIZE, 93,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(btnEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 93,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(btnDelete, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 93,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 93,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));
    pnlButtonLayout.setVerticalGroup(pnlButtonLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlButtonLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlButtonLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnEdit).addComponent(btnNew2).addComponent(btnSave)
                            .addComponent(btnCancel).addComponent(btnDelete))
                    .addContainerGap()));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(panelForm, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(panelForm, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(pnlButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGap(20, 20, 20)))));

    bindingGroup.bind();
}