remove debug try..catch.
parent
a83d512a08
commit
db80ef14ee
|
@ -10,10 +10,8 @@ import javax.swing.table.DefaultTableCellRenderer;
|
||||||
class PlayerCellRenderer extends DefaultTableCellRenderer {
|
class PlayerCellRenderer extends DefaultTableCellRenderer {
|
||||||
@Override
|
@Override
|
||||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||||
String text = "";
|
|
||||||
try {
|
|
||||||
PlayerInfo playerInfo = (PlayerInfo) value;
|
PlayerInfo playerInfo = (PlayerInfo) value;
|
||||||
text = playerInfo.isHuman()
|
String text = playerInfo.isHuman()
|
||||||
? String.format("<html><center>%s</center></html>",
|
? String.format("<html><center>%s</center></html>",
|
||||||
playerInfo.getHumanPlayerName()
|
playerInfo.getHumanPlayerName()
|
||||||
)
|
)
|
||||||
|
@ -24,9 +22,6 @@ class PlayerCellRenderer extends DefaultTableCellRenderer {
|
||||||
playerInfo.getAiXtraLife(),
|
playerInfo.getAiXtraLife(),
|
||||||
playerInfo.getAiType().toString()
|
playerInfo.getAiType().toString()
|
||||||
);
|
);
|
||||||
} catch (Exception ex) {
|
|
||||||
text = "!!!";
|
|
||||||
}
|
|
||||||
JLabel lbl = new JLabel(text);
|
JLabel lbl = new JLabel(text);
|
||||||
lbl.setHorizontalAlignment(SwingConstants.CENTER);
|
lbl.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
lbl.setOpaque(true);
|
lbl.setOpaque(true);
|
||||||
|
|
Loading…
Reference in New Issue