Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Cannot find symbol - class DBCellRenderer.
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 3rd November 13:58
peter
External User
 
Posts: 1
Default Cannot find symbol - class DBCellRenderer.



Cannot find symbol - class DBCellRenderer.

What is the correct import statement needed in order to correct
these problems? I am using Jbuilder Foundation 2005, and also
have access to Developer 2005 (update 4).

The program below is an extract from the following Borland site

…info.borland.com/techpubs/jbuilder/jbuilder2005…JdbTable

Other errors are, variable super (2 occurrences), and
incompatible types found on the return statement

================================================== ====
package pvnaa;

import java.awt.*;
import javax.swing.*;
import com.borland.dbswing.*;

public class NegativeNumberRenderer
extends JdbTable.DBCellRenderer {

public NegativeNumberRenderer(JdbTable jdbTable) {
jdbTable.super();
}

public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (value != null) {
try {
// Compare numeric value of string to zero. This assumes that a negative
// value has a leading minus sign, so only handles simple numeric formats
if (Double.parseDouble( (String) value) < 0.0d) {
super.setForeground(Color.red);
}
}
// Use the default foreground if we can't get a number from the string
catch (NumberFormatException nfe) {
}
}
return this;
}
}
=============================================
  Reply With Quote


 


2 3rd November 13:58
kevin dean [teamb]
External User
 
Posts: 1
Default Cannot find symbol - class DBCellRenderer.



The JdbTable documentation is out of sync with the code. The
DBTableCellRenderer is actually a member of the JdbList class, not of
JdbTable.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
  Reply With Quote
3 3rd November 13:58
peter
External User
 
Posts: 1
Default Cannot find symbol - class DBCellRenderer.


I do not think JDBList is an option.

The objective here is to have a formatted display and edit mask
for the phone number. In the Jbuilder Designer, entering the
value ("'('000')'000'-'0000;0;0") in the displaymask and
editmask dose not work. In searching the web, the solution is
to write a cell editor renderer class. The web is full of
examples for Jtable, but nothing for JDBTable, other that the
few date examples. I also read that these masks are not
supported yet in JBuilder 2005, see borland answers # 2741 and
newsgroup = dbswing # 4170
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666