01: package org.swingml.tablebrowser.ext;
02:
03: import java.awt.*;
04:
05: import javax.swing.*;
06: import javax.swing.table.*;
07:
08: /**
09: * @author dpitt
10: */
11: public class EditCellRenderer extends JTextField implements
12: TableCellRenderer {
13:
14: /**
15: * @see javax.swing.table.TableCellRenderer#getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int)
16: */
17: public Component getTableCellRendererComponent(JTable table,
18: Object value, boolean isSelected, boolean hasFocus,
19: int row, int column) {
20:
21: setBackground(Color.gray);
22:
23: return this;
24: }
25:
26: }
|