Java Code Examples for javax.swing.BorderFactory#createRaisedBevelBorder()

The following examples show how to use javax.swing.BorderFactory#createRaisedBevelBorder() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RowHeaderRenderer.java    From ramus with GNU General Public License v3.0 5 votes vote down vote up
RowHeaderRenderer(final JTable table) {
    this.table = table;
    normalBorder = UIManager.getBorder("TableHeader.cellBorder");
    selectedBorder = BorderFactory.createRaisedBevelBorder();
    final JTableHeader header = table.getTableHeader();
    normalFont = header.getFont();
    selectedFont = normalFont.deriveFont(normalFont.getStyle() | Font.BOLD);
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setOpaque(true);
}
 
Example 2
Source File: RowHeaderRenderer.java    From nextreports-designer with Apache License 2.0 5 votes vote down vote up
RowHeaderRenderer(JTable table) {
    this.table = table;
    // this needs to be updated if the LaF changes
    normalBorder = UIManager.getBorder("TableHeader.cellBorder");
    selectedBorder = BorderFactory.createRaisedBevelBorder();
    final JTableHeader header = this.table.getTableHeader();
    normalFont = header.getFont();
    selectedFont = normalFont.deriveFont(normalFont.getStyle() | Font.BOLD);
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setOpaque(true);
    setHorizontalAlignment(CENTER);
}