-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconsoleLogsViewCR.java
More file actions
42 lines (33 loc) · 1.02 KB
/
consoleLogsViewCR.java
File metadata and controls
42 lines (33 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package Jvakt;
/*
* 2023-11-20 V.01 Michael Ekdal New pgm to list the logs in the DB
*/
import javax.swing.*;
import java.awt.*;
import javax.swing.table.*;
class consoleLogsViewCR extends DefaultTableCellRenderer
{
// private String columnName;
static final long serialVersionUID = 51L;
public consoleLogsViewCR()
{
super.setOpaque(true);
}
public Component getTableCellRendererComponent(JTable table, Object obj, boolean isSelected, boolean hasFocus, int row, int column)
{
Component cell = super.getTableCellRendererComponent(
table, obj, isSelected, hasFocus, row, column);
setFont(new javax.swing.plaf.FontUIResource("Dialog", Font.BOLD, table.getRowHeight()-3));
if(isSelected) {
setBackground(table.getSelectionBackground());
// setForeground(table.getSelectionForeground());
}
else {
super.setBackground(table.getBackground());
// super.setForeground(table.getForeground());
// super.setBackground(Color.lightGray);
// super.setBackground(Color.yellow);
}
return cell;
}
}