Example usage for javax.swing BorderFactory createBevelBorder

List of usage examples for javax.swing BorderFactory createBevelBorder

Introduction

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

Prototype

public static Border createBevelBorder(int type) 

Source Link

Document

Creates a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.

Usage

From source file:pcgen.gui2.dialog.AboutDialog.java

/**
 * Construct the includes panel. This panel shows details
 * and licencing statrements about any libraries distributed
 * with PCGen.//from   w  ww. j a  v  a 2s . c om
 *
 * @return The includes panel.
 */
private JPanel buildIncludesPanel() {
    JPanel iPanel = new JPanel();

    JTextArea otherLibrariesField = new JTextArea();

    iPanel.setLayout(new BorderLayout());

    String s = LanguageBundle.getString("in_abt_lib_apache"); //$NON-NLS-1$
    s += LanguageBundle.getString("in_abt_lib_jdom"); //$NON-NLS-1$
    s += LanguageBundle.getString("in_abt_lib_l2f"); //$NON-NLS-1$
    otherLibrariesField.setText(s);
    otherLibrariesField.setWrapStyleWord(true);
    otherLibrariesField.setLineWrap(true);
    otherLibrariesField.setEditable(false);
    otherLibrariesField.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));

    iPanel.add(otherLibrariesField, BorderLayout.CENTER);

    return iPanel;
}

From source file:rita.widget.SourceCode.java

private SourceCode() {
    this.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
    this.setLocation(OFFSET_FROM_RIGHT - MIN_WIDTH, OFFSET_FROM_BOTTOM - BUTTON_HEIGHT);
    this.setSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
    this.setPreferredSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));

    this.setLayout(null);
    smallButtonFont = this.getFont().deriveFont(Font.PLAIN, 9.0f);

    this.enlarger = new SourceCodeEnlargerTimer();
    createHideCodeButton();/*from   ww  w. jav a2  s . c o m*/
    createCompileButton();
    prepareCodeRegion();
    add(codeButton);
    add(compileButton);
    add(paneJavaCode.getWrappingContainerWithLines());

    Workspace.getInstance().addComponentListener(this);

}

From source file:storybook.toolkit.swing.SwingUtil.java

public static JPanel createNotesPanel(JTextArea taNotes) {
    MigLayout layout = new MigLayout("fill", "", "[top]");
    JPanel panel = new JPanel(layout);
    taNotes.setLineWrap(true);/* w w w  .  ja  va  2  s .c o  m*/
    taNotes.setWrapStyleWord(true);
    taNotes.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
    JScrollPane scroller = new JScrollPane(taNotes);
    scroller.setPreferredSize(new Dimension(400, 400));
    panel.add(scroller, "grow");
    return panel;
}

From source file:us.paulevans.basicxslt.BasicXSLTFrame.java

/**
 * Builds the south panel//from w w  w  .  j a v  a 2 s  .  c  o m
 * @return
 */
private JPanel buildSouthPanel() {

    JPanel transformBtnPanel;
    JPanel footerPanel;
    JPanel southPanel;
    JPanel panel;
    JLabel label;
    Font footerPanelFont;
    Font footerPanelFontBold;

    transformBtnPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
    transformBtnPanel.add(
            transformBtn = new JButton(stringFactory.getString(LabelStringFactory.MAIN_FRAME_TRANSFORM_BTN)));
    transformBtnPanel
            .add(exitBtn = new JButton(stringFactory.getString(LabelStringFactory.MAIN_FRAME_EXIT_BTN)));

    footerPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    southPanel = new JPanel(new BorderLayout());
    southPanel.add(transformBtnPanel, BorderLayout.CENTER);
    southPanel.add(footerPanel, BorderLayout.SOUTH);
    footerPanelFont = new Font("arial", Font.PLAIN, 12);
    footerPanelFontBold = new Font("arial", Font.BOLD, 12);
    footerPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));

    panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    panel.add(label = new JLabel(stringFactory.getString(LabelStringFactory.MAIN_FRAME_CURRENT_CONFIGURATION)));
    label.setFont(footerPanelFontBold);
    label.setForeground(Color.BLUE);
    panel.add(currentConfigLabel = new JLabel(userPrefs.getConfiguration()));
    currentConfigLabel.setFont(footerPanelFont);
    footerPanel.add(panel);

    panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    panel.add(label = new JLabel(stringFactory.getString(LabelStringFactory.MAIN_FRAME_TOTAL_TRANSFORM_TIME)));
    label.setFont(footerPanelFontBold);
    label.setForeground(Color.BLUE);
    panel.add(transformTimeLabel = new JLabel(lastTotalTransformTime + " "
            + stringFactory.getString(LabelStringFactory.MAIN_FRAME_MILLISECONDS_ABBREVIATION)));
    transformTimeLabel.setFont(footerPanelFont);
    footerPanel.add(panel);

    transformTimeLabel.setFont(footerPanelFont);
    footerPanel.add(new JLabel(""));
    footerPanel.add(new JLabel(""));
    transformBtn.addActionListener(this);
    exitBtn.addActionListener(this);
    return southPanel;
}