Example usage for javax.swing BorderFactory createEmptyBorder

List of usage examples for javax.swing BorderFactory createEmptyBorder

Introduction

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

Prototype

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

Source Link

Document

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

Usage

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

private void setStrings() {
    dialog.setLocale(locale);//from www  .jav  a2 s . c om
    dialog.applyComponentOrientation(ComponentOrientation.getOrientation(locale));

    selectionPanelBorder.setTitle(buildString("LanguageSelection.1"));

    selectionPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5),
            BorderFactory.createCompoundBorder(selectionPanelBorder,
                    BorderFactory.createEmptyBorder(10, 5, 10, 5))));

    String descriptionMessage = parentComponent != null ? "LanguageSelection.7" : "LanguageSelection.2";
    if (Messages.getString(descriptionMessage, locale).equals(Messages.getRootString(descriptionMessage))) {
        if (parentComponent != null) {
            descriptionText.setText(String.format(Messages.getString(descriptionMessage, locale), PMS.NAME));
        } else {
            descriptionText.setText(String.format(Messages.getString(descriptionMessage, locale), PMS.NAME,
                    Messages.getString("LooksFrame.20", locale)));
        }
    } else {
        if (parentComponent != null) {
            descriptionText.setText(String.format(buildString(descriptionMessage, true), PMS.NAME, PMS.NAME));
        } else {
            descriptionText.setText(String.format(buildString(descriptionMessage, true), PMS.NAME,
                    Messages.getString("LooksFrame.20", locale), PMS.NAME,
                    Messages.getRootString("LooksFrame.20")));
        }
    }
    // Set the width of the text panels by font size to accommodate font scaling
    float avgCharWidth = SwingUtils.getComponentAverageCharacterWidth(descriptionText);
    textWidth = Math.round(avgCharWidth * 100);
    selectButton.setMargin(new Insets(Math.round((float) 0.5 * avgCharWidth), Math.round(4 * avgCharWidth),
            Math.round((float) 0.5 * avgCharWidth), Math.round(4 * avgCharWidth)));
    applyButton.setMargin(new Insets(Math.round((float) 0.5 * avgCharWidth), Math.round(4 * avgCharWidth),
            Math.round((float) 0.5 * avgCharWidth), Math.round(4 * avgCharWidth)));

    descriptionText.setPreferredSize(SwingUtils.getWordWrappedTextDimension(descriptionText, textWidth));

    keyedModel.setData(Languages.getLanguageTags(locale), Languages.getLanguageNames(locale));
    //Try to find a matching locale
    String languageTag = Languages.toLanguageTag(locale);
    int idx;
    if (languageTag != null) {
        idx = keyedModel.findKeyIndex(languageTag);
    } else {
        idx = -1;
    }
    if (idx < 0) {
        // Trying to translate a close match to "our" definition
        Locale tmpLocale = Languages.toLocale(locale);
        if (tmpLocale == null) {
            // Trying to find a supported locale based only on language and country
            tmpLocale = Languages.toLocale(new Locale(locale.getLanguage(), locale.getCountry()));
            if (tmpLocale == null) {
                // Trying to find a supported locale based only on language
                tmpLocale = Languages.toLocale(new Locale(locale.getLanguage()));
                if (tmpLocale == null) {
                    // Giving up, defaulting to US English
                    tmpLocale = Languages.toLocale("en-US");
                }
            }
        }
        // We should be guaranteed to get a valid tag here
        languageTag = Languages.toLanguageTag(tmpLocale);
    }
    keyedModel.setSelectedKey(languageTag);

    if (keyedModel.getSelectedKey() != null && Languages.warnCoverage(keyedModel.getSelectedKey())) {
        String localizedLanguageName = Messages.getString("Language." + keyedModel.getSelectedKey(), locale);
        if (Messages.getString("LanguageSelection.3", locale)
                .equals(Messages.getRootString("LanguageSelection.3"))) {
            warningText.setText(
                    String.format(Messages.getString("LanguageSelection.3", locale), localizedLanguageName,
                            Languages.getLanguageCoverage(keyedModel.getSelectedKey()), localizedLanguageName));
        } else {
            int coverage = Languages.getLanguageCoverage(keyedModel.getSelectedKey());
            String rootLanguageName = Messages.getRootString("Language." + keyedModel.getSelectedKey());
            warningText.setText(String.format(buildString("LanguageSelection.3", true), localizedLanguageName,
                    coverage, localizedLanguageName, rootLanguageName, coverage, rootLanguageName));
        }
    } else {
        warningText.setText("");
    }
    warningText.setPreferredSize(SwingUtils.getWordWrappedTextDimension(warningText, textWidth));

    infoTextBorder.setTitle(buildString("LanguageSelection.4"));

    infoText.setText(
            String.format(buildString("LanguageSelection.5", true, true), PMS.CROWDIN_LINK, PMS.CROWDIN_LINK));
    infoText.setPreferredSize(SwingUtils.getWordWrappedTextDimension(infoText, textWidth,
            StringUtil.stripHTML(infoText.getText())));

    selectButton.setText(buildString("Dialog.Select"));
    applyButton.setText(buildString("Dialog.Apply"));
}

From source file:net.sf.xmm.moviemanager.gui.DialogIMDbMultiAdd.java

JPanel createFileLocationPanel() {
    // Panel file location
    JPanel fileLocationPanel = new JPanel();
    fileLocationPanel.setBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), " Movie parts "),
            BorderFactory.createEmptyBorder(0, 3, 3, 3)));
    fileLocationPanel.setLayout(new BorderLayout());
    fileLocation = new JTextArea();
    fileLocation.setEditable(false);//  ww w  .  jav a 2  s  . c om

    JScrollPane fileLocaScroll = new JScrollPane(fileLocation);

    fileLocationPanel.add(fileLocaScroll, BorderLayout.CENTER);
    fileLocation.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent e) {
            //handleFileLocationPopup(e);
        }
    });
    return fileLocationPanel;
}

From source file:diet.gridr.g5k.gui.G5kSummaryChart.java

/**
 * Default constructor/*from w w  w.  j  a v  a2 s. c om*/
 *
 * @param data data to display
 * @param dim dimension of the Panel
 */
public G5kSummaryChart(int[][] data) {
    super();
    this.data = data;
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    add(getChartSelectionPanel());
    add(getCardPanel());
    setVisible(true);
    LoggingManager.log(Level.FINE, LoggingManager.RESOURCESTOOL, this.getClass().getName(), "G5kSummaryChart",
            "G5k summary Chart initiliazed");
}

From source file:br.org.acessobrasil.ases.ferramentas_de_reparo.vista.preenchedor_formulario.PanelPreenchedorFormulario.java

private void criaInterfaceVisualEscalavel() {
    miBtnSalvar = new JMenuItem(XHTML_Panel.BTN_SALVAR);
    painel = new JPanel();
    textAreaSourceCode = new G_TextAreaSourceCode();
    // frameSilvinha.setJMenuBar(this.criaMenuBar());
    new OnChange(textAreaSourceCode, this);

    textAreaSourceCode.setTipoHTML();//w  w w .  j a  v a  2s.co  m
    textAreaSourceCode.setBorder(criaBorda(XHTML_Panel.COD_FONTE));

    painel.setLayout(new GridLayout(2, 1));
    setBackground(frameSilvinha.corDefault);

    Container contentPane = this;
    contentPane.setLayout(new GridLayout(1, 1));
    painel.add(textAreaSourceCode);

    JPanel panelBtnTabela = new JPanel();

    panelBtnTabela.setLayout(new BorderLayout());

    /*
     * Barra de botes
     */
    btnPanel = new JPanel();
    btnPanel.setLayout(null);
    btn_salvar = new JButton(XHTML_Panel.BTN_SALVAR);
    btn_salvar.setToolTipText(XHTML_Panel.DICA_SALVAR);
    btn_salvar.setBounds(10, 0, 150, 25);
    btnPanel.add(btn_salvar);

    btn_abrir = new JButton(XHTML_Panel.BTN_ABRIR);
    btn_abrir.setToolTipText(XHTML_Panel.DICA_ABRIR);
    btn_abrir.setBounds(165, 0, 150, 25);
    btnPanel.add(btn_abrir);

    btn_salvarComo = new JButton(XHTML_Panel.BTN_SALVAR_COMO);
    btn_salvarComo.setToolTipText(XHTML_Panel.DICA_SALVAR_COMO);
    btn_salvarComo.setBounds(320, 0, 150, 25);
    btnPanel.add(btn_salvarComo);

    btn_cancelar = new JButton(XHTML_Panel.TELA_ANTERIOR);
    btn_cancelar.setToolTipText(XHTML_Panel.DICA_TELA_ANTERIOR);
    btn_cancelar.setBounds(480, 0, 150, 25);
    btnPanel.add(btn_cancelar);

    btnPanel.setPreferredSize(new Dimension(430, 30));

    /*
     * Barra de correcao
     */
    btnAplicar = new JButton(XHTML_Panel.BTN_APLICAR);
    btnAplicar.setToolTipText(XHTML_Panel.DICA_BTN_APLICAR);
    btnAplicar.setEnabled(false);

    texto = new JTextField();

    texto.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    JPanel borda = new JPanel(new BorderLayout());
    JLabel lbl_texto = new JLabel(XHTML_Panel.ROTULO_TEXTO);
    lbl_texto.setToolTipText(XHTML_Panel.DICA_ROTULO_TEXTO);
    borda.add(lbl_texto, BorderLayout.WEST);
    borda.add(texto, BorderLayout.CENTER);
    borda.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
    borda.setOpaque(false);
    panelCorretor = new JPanel(new BorderLayout());
    panelCorretor.add(borda, BorderLayout.CENTER);
    panelCorretor.add(btnAplicar, BorderLayout.EAST);
    //panelCorretor.add(btnPanel, BorderLayout.WEST);
    panelCorretor.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
    panelCorretor.setOpaque(false);

    /*
     * Tabela de erros
     */
    tabelaDeErros = new TabelaErros();
    scrollPaneTabela = new JScrollPane();
    scrollPaneTabela.setViewportView(tabelaDeErros);
    panelBtnTabela.add(panelCorretor, BorderLayout.NORTH);
    panelBtnTabela.add(scrollPaneTabela, BorderLayout.CENTER);
    panelBtnTabela.add(btnPanel, BorderLayout.SOUTH);
    scrollPaneTabela.setBorder(criaBorda(XHTML_Panel.LISTA_ERROS));
    painel.add(panelBtnTabela);

    btnPanel.setBackground(frameSilvinha.corDefault);

    if (!original) {
        reverter = new JButton("Reverter");
        reverter.setText(TradPainelRelatorio.REVERTER);
        reverter.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                setVisible(false);
                TxtBuffer.setContent(TxtBuffer.getContentOriginal());
                frameSilvinha.showPainelPreencheCampo();
                setVisible(true);
            }
        });
        //reverter.setActionCommand("Reverter");
        reverter.setToolTipText(TradPainelRelatorio.DICA_REVERTER);
        reverter.getAccessibleContext().setAccessibleDescription(TradPainelRelatorio.DICA_REVERTER);
        reverter.getAccessibleContext().setAccessibleName(TradPainelRelatorio.DICA_REVERTER);
        reverter.setBounds(640, 0, 150, 25);
        btnPanel.add(reverter);
    }

    panelBtnTabela.setBackground(frameSilvinha.corDefault);
    painel.setBackground(frameSilvinha.corDefault);
    contentPane.setBackground(frameSilvinha.corDefault);
    scrollPaneTabela.setBackground(frameSilvinha.corDefault);
    textAreaSourceCode.setBackground(frameSilvinha.corDefault);
    miBtnSalvar.setEnabled(false);
    btn_salvar.setEnabled(false);
    salvaAlteracoes = TxtBuffer.getInstanciaSalvaAlteracoes(textAreaSourceCode.getTextPane(), btn_salvar,
            miBtnSalvar, frameSilvinha);
    contentPane.add(painel);
    // pack();
    this.setVisible(true);
}

From source file:net.sf.xmm.moviemanager.gui.DialogIMDB.java

private void createListDialog() {
    /* Dialog properties...*/

    setModal(true);/*from w w w .  j  a va  2 s . com*/
    setResizable(true);

    panelMoviesList = createMoviehitsList();
    JPanel searchPanel = createSearchStringPanel();
    JPanel panelButtons = createButtonsPanel();

    JPanel panelSearchAndButtons = new JPanel();
    panelSearchAndButtons.setLayout(new BorderLayout());
    panelSearchAndButtons.add(searchPanel, BorderLayout.NORTH);
    panelSearchAndButtons.add(panelButtons, BorderLayout.SOUTH);

    subclassButtons = new JPanel();

    JPanel sharedPanel = new JPanel();
    sharedPanel.setLayout(new BorderLayout());
    sharedPanel.add(panelSearchAndButtons, BorderLayout.NORTH);
    sharedPanel.add(subclassButtons, BorderLayout.SOUTH);

    /* To add outside border... */
    JPanel all = new JPanel();
    all.setLayout(new BorderLayout());
    all.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5), null));
    all.add(panelMoviesList, BorderLayout.CENTER);
    all.add(sharedPanel, BorderLayout.SOUTH);

    getContentPane().add(all, BorderLayout.CENTER);
    //getContentPane().add(sharedPanel,BorderLayout.SOUTH);

    getMoviesList().ensureIndexIsVisible(0);

    setPreferredSize(new Dimension(500, 440));
    setMinimumSize(new Dimension(500, 440));

    pack();

    setLocation(
            (int) MovieManager.getIt().getLocation().getX()
                    + (MovieManager.getIt().getWidth() - getWidth()) / 2,
            (int) MovieManager.getIt().getLocation().getY()
                    + (MovieManager.getIt().getHeight() - getHeight()) / 2);

}

From source file:be.ac.ua.comp.scarletnebula.gui.ServerCellRenderer.java

private Component getNewServerServer(final JList list, final int index, final boolean isSelected) {
    final JPanel p = createServerPanel(null, list, index, isSelected);
    final JLabel label = new JLabel("Start a new server",
            new ImageIcon(getClass().getResource("/images/add.png")), SwingConstants.LEFT);
    label.setFont(new Font(label.getFont().getName(), Font.PLAIN, 16));
    // Border for better horizontal alignment
    label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 12));
    p.add(label);//from  w w  w . java2 s . co m

    return p;
}

From source file:diet.gridr.g5k.gui.GanttChart.java

/**
 * Method returning the TablePanel/*from  w  w w . j  a  va  2 s. c  o m*/
 *
 * @return the table panel
 */
private JPanel getTablePanel() {
    tablePanel = new JPanel();
    tablePanel.setLayout(new BoxLayout(tablePanel, BoxLayout.Y_AXIS));
    tablePanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 10, 10));
    jobsTable = new JTable();
    jobsModel = new ClusterJobsSummaryModel();
    jobsTable.setModel(jobsModel);
    ClusterJobsSummaryCellRenderer renderer = new ClusterJobsSummaryCellRenderer();
    jobsTable.setDefaultRenderer(String.class, renderer);
    JLabel jobsTableTitle = new JLabel("Jobs status");
    jobsTableTitle.setAlignmentX(JLabel.CENTER_ALIGNMENT);
    jobsTableTitle.setFont(new Font("Dialog", Font.BOLD, 14));
    tablePanel.add(Box.createVerticalStrut(5));
    tablePanel.add(jobsTableTitle);
    tablePanel.add(Box.createVerticalStrut(10));
    tablePanel.add(jobsTable.getTableHeader());
    tablePanel.add(jobsTable);
    LoggingManager.log(Level.FINE, LoggingManager.RESOURCESTOOL, this.getClass().getName(), "getTablePanel",
            "TablePanel constructed");
    return tablePanel;
}

From source file:org.obiba.onyx.jade.instrument.ricelake.RiceLakeWeightInstrumentRunner.java

protected JPanel buildMeasureCountSubPanel() {
    JPanel panel = new JPanel();

    panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
    panel.add(measureCountLabel = new MeasureCountLabel());
    panel.setAlignmentX(Component.LEFT_ALIGNMENT);

    return (panel);
}

From source file:org.cds06.speleograph.graph.ValueAxisEditor.java

/**
 * {@inheritDoc}/*from w w  w  .  j a va 2  s .  com*/
 */
@Override
protected void setup() {
    PanelBuilder builder = new PanelBuilder(getFormLayout(), getPanel());
    CellConstraints cc = new CellConstraints();

    Dimension d = maxModifier.getPreferredSize();
    maxModifier.setPreferredSize(new Dimension(d.width + 50, d.height));
    d = minModifier.getPreferredSize();
    minModifier.setPreferredSize(new Dimension(d.width + 50, d.height));

    {
        builder.add(new JLabel("Titre de l'axe :"));
        final JTextField axisTitleField = new JTextField();
        axisTitleField.setText(axis.getLabel());
        builder.nextColumn(2);
        builder.add(axisTitleField, cc.xyw(3, 1, 5));
        addListenerOnSuccess(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                String text = axisTitleField.getText();
                if (text != null && !text.equals(""))
                    axis.setLabel(axisTitleField.getText());
            }
        });
    }

    {
        builder.nextLine(2);
        builder.add(new JLabel("Valeur min. :"));
        builder.nextColumn(2);
        builder.add(lowField);
        addListenerOnSuccess(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                try {
                    Double value = Double.valueOf(lowField.getText());
                    if (isApply) {
                        axis.setLowerBound(value);
                    } else if (isCancel && oldLowValue != null)
                        axis.setLowerBound(oldLowValue);
                } catch (NumberFormatException e1) {
                    canClose = false;
                    JOptionPane.showMessageDialog(ValueAxisEditor.this.getParent(),
                            "'" + lowField.getText() + "' n'est pas un nombre", "Erreur",
                            JOptionPane.ERROR_MESSAGE);
                }
            }
        });
        builder.nextColumn(2);
        builder.add(new JLabel("+"));
        builder.nextColumn(2);
        builder.add(minModifier);
    }

    {
        builder.nextLine(2);
        builder.add(new JLabel("Valeur max. :"));
        builder.nextColumn(2);
        builder.add(maxField);
        addListenerOnSuccess(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                try {
                    Double value = Double.valueOf(maxField.getText());
                    if (isApply) {
                        axis.setUpperBound(value);
                    } else if (isCancel && oldHighValue != null)
                        axis.setUpperBound(oldHighValue);
                } catch (NumberFormatException e1) {
                    canClose = false;
                    JOptionPane.showMessageDialog(ValueAxisEditor.this.getParent(),
                            "'" + maxField.getText() + "' n'est pas un nombre", "Erreur",
                            JOptionPane.ERROR_MESSAGE);
                }
            }
        });
        builder.nextColumn(2);
        builder.add(new JLabel("+"));
        builder.nextColumn(2);
        builder.add(maxModifier);
    }

    {
        builder.nextLine(2);
        builder.add(new JLabel("<HTML><strong>Sries associes  l'axe</strong></HTML>"), cc.xyw(1, 7, 3));
        String linkedSeries = "<html><ul>";
        for (Series series : Series.getInstances()) {
            if (series.getAxis().equals(axis))
                linkedSeries += "<li>" + series.toString(true) + "</li>";
        }
        linkedSeries += "</ul></html>";

        builder.add(new JLabel(linkedSeries), cc.xyw(1, 8, 3));
    }

    JPanel buttonPanel = new JPanel();
    ButtonBarBuilder buttonBuilder = new ButtonBarBuilder(buttonPanel);
    buttonBuilder.addGlue();
    {
        buttonBuilder.addButton(new AbstractAction() {

            {
                putValue(NAME, I18nSupport.translate("cancel"));
            }

            @Override
            public void actionPerformed(ActionEvent e) {
                isCancel = true;
                isApply = false;
                canClose = true;
                validateForm();
            }
        });
    }

    {
        buttonBuilder.addButton(new AbstractAction() {

            {
                putValue(NAME, I18nSupport.translate("apply"));
            }

            @Override
            public void actionPerformed(ActionEvent e) {
                isCancel = false;
                isApply = true;
                canClose = false;
                validateForm();
            }
        });
    }

    {
        buttonBuilder.addButton(new AbstractAction() {

            {
                putValue(NAME, I18nSupport.translate("ok"));
            }

            @Override
            public void actionPerformed(ActionEvent e) {
                isCancel = false;
                isApply = true;
                canClose = true;
                validateForm();
            }
        });
    }

    buttonBuilder.build();
    buttonPanel.setVisible(true);
    builder.add(buttonBuilder.getPanel(), cc.xyw(1, 10, 10));

    {
        translateSlider.setToolTipText("Translation des axes");
        translateSlider.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
                int maxValue = -translateSlider.getValue();
                maxModifier.setText(String.valueOf(maxValue));
                int lowValue = -translateSlider.getValue();
                minModifier.setText(String.valueOf(lowValue));
            }
        });
        builder.add(translateSlider, cc.xywh(9, 1, 1, 8));
    }
    {
        homotSlider.setToolTipText("Homothtie sur les axes");
        homotSlider.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
                int maxValue = -homotSlider.getValue();
                maxModifier.setText(String.valueOf(maxValue));
                int lowValue = homotSlider.getValue();
                minModifier.setText(String.valueOf(lowValue));
            }
        });
        builder.add(homotSlider, cc.xywh(10, 1, 1, 8));
    }

    builder.build();

    getPanel().setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));

    addListenerOnSuccess(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (canClose)
                setVisible(false);
        }
    });
}

From source file:br.org.acessobrasil.ases.ferramentas_de_reparo.vista.corretor_eventos.PanelCorretorEventos.java

private void criaInterfaceVisualEscalavel() {
    miBtnSalvar = new JMenuItem(XHTML_Panel.BTN_SALVAR);
    painel = new JPanel();
    frameSilvinha.setJMenuBar(this.criaMenuBar());

    textAreaSourceCode.setTipoHTML();/*from w ww.ja  v  a 2 s. com*/
    textAreaSourceCode.setBorder(criaBorda(XHTML_Panel.COD_FONTE));
    frameSilvinha.setTitle(XHTML_Panel.TIT_CORR_EVT);

    painel.setLayout(new GridLayout(2, 1));
    setBackground(frameSilvinha.corDefault);

    Container contentPane = this;
    contentPane.setLayout(new GridLayout(1, 1));
    painel.add(textAreaSourceCode);

    JPanel panelBtnTabela = new JPanel();

    panelBtnTabela.setLayout(new BorderLayout());

    /*
     * Barra de botes
     */
    btnPanel = new JPanel();
    btnPanel.setLayout(null);
    btn_salvar = new JButton(XHTML_Panel.BTN_SALVAR);
    btn_salvar.setToolTipText(XHTML_Panel.DICA_SALVAR);
    btn_salvar.setBounds(10, 0, 150, 25);
    btnPanel.add(btn_salvar);

    btn_abrir = new JButton(XHTML_Panel.BTN_ABRIR);
    btn_abrir.setToolTipText(XHTML_Panel.DICA_ABRIR);
    btn_abrir.setBounds(165, 0, 150, 25);
    btnPanel.add(btn_abrir);

    btn_salvarComo = new JButton(XHTML_Panel.BTN_SALVAR_COMO);
    btn_salvarComo.setToolTipText(XHTML_Panel.DICA_SALVAR_COMO);
    btn_salvarComo.setBounds(320, 0, 150, 25);
    btnPanel.add(btn_salvarComo);

    btn_cancelar = new JButton(XHTML_Panel.TELA_ANTERIOR);
    btn_cancelar.setToolTipText(XHTML_Panel.DICA_TELA_ANTERIOR);
    btn_cancelar.setBounds(480, 0, 150, 25);
    btnPanel.add(btn_cancelar);

    btnPanel.setPreferredSize(new Dimension(430, 30));

    /*
     * Barra de correcao
     */
    btnAplicar = new JButton(XHTML_Panel.BTN_APLICAR);
    btnAplicar.setToolTipText(XHTML_Panel.DICA_BTN_APLICAR);
    btnAplicar.setEnabled(false);

    texto = new JTextField();

    texto.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    JPanel borda = new JPanel(new BorderLayout());
    lbl_texto = new JLabel("JavaScript: ");
    lbl_texto.setToolTipText(XHTML_Panel.DICA_JAVASCRIPT);
    borda.add(lbl_texto, BorderLayout.WEST);
    borda.add(texto, BorderLayout.CENTER);
    borda.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
    borda.setOpaque(false);
    panelCorretor = new JPanel(new BorderLayout());
    panelCorretor.add(borda, BorderLayout.CENTER);
    panelCorretor.add(btnAplicar, BorderLayout.EAST);
    // panelCorretor.add(btnPanel,BorderLayout.WEST);
    panelCorretor.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
    panelCorretor.setOpaque(false);

    /*
     * Tabela de erros
     */
    tabelaDeErros = new TabelaErros();
    scrollPaneTabela = new JScrollPane();
    scrollPaneTabela.setViewportView(tabelaDeErros);
    panelBtnTabela.add(panelCorretor, BorderLayout.NORTH);
    panelBtnTabela.add(scrollPaneTabela, BorderLayout.CENTER);
    panelBtnTabela.add(btnPanel, BorderLayout.SOUTH);
    scrollPaneTabela.setBorder(criaBorda(XHTML_Panel.LISTA_ERROS));
    painel.add(panelBtnTabela);

    btnPanel.setBackground(frameSilvinha.corDefault);
    {
        reverter = new JButton("Reverter");
        reverter.setText(TradPainelRelatorio.REVERTER);
        reverter.setToolTipText(TradPainelRelatorio.DICA_REVERTER);
        reverter.getAccessibleContext().setAccessibleDescription(TradPainelRelatorio.DICA_REVERTER);
        reverter.getAccessibleContext().setAccessibleName(TradPainelRelatorio.DICA_REVERTER);
        reverter.setBounds(480, 0, 150, 25);
        btnPanel.add(reverter);
        reverter = new JButton("Reverter");
        reverter.setText(TradPainelRelatorio.REVERTER);
        reverter.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                setVisible(false);
                TxtBuffer.setContent(TxtBuffer.getContentOriginal());
                frameSilvinha.showPainelFerramentaEventoDependente();
                setVisible(true);
            }
        });
        reverter.setToolTipText(TradPainelRelatorio.DICA_REVERTER);
        reverter.getAccessibleContext().setAccessibleDescription(TradPainelRelatorio.DICA_REVERTER);
        reverter.getAccessibleContext().setAccessibleName(TradPainelRelatorio.DICA_REVERTER);
        reverter.setBounds(640, 0, 150, 25);
        btnPanel.add(reverter);
    }
    panelBtnTabela.setBackground(frameSilvinha.corDefault);
    painel.setBackground(frameSilvinha.corDefault);
    contentPane.setBackground(frameSilvinha.corDefault);
    scrollPaneTabela.setBackground(frameSilvinha.corDefault);
    textAreaSourceCode.setBackground(frameSilvinha.corDefault);
    miBtnSalvar.setEnabled(false);
    btn_salvar.setEnabled(false);
    salvaAlteracoes = TxtBuffer.getInstanciaSalvaAlteracoes(textAreaSourceCode.getTextPane(), btn_salvar,
            miBtnSalvar, frameSilvinha);
    String fil[] = { ".html", ".htm" };
    salvaAlteracoes.setFiltro(fil);
    contentPane.add(painel);
    // pack();
    this.setVisible(true);
}