}
for (int i = 0; i <= cols; i++) {
g.drawLine(i * dx, 0, i * dx, rows * dy);
}
int oldColor = g.getColor();
g.setColor(0x00D0D0D0);
g.fillRect((currentX * dx) + 1, (currentY * dy) + 1, dx - 1, dy - 1);
g.setColor(oldColor);
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
if (data[i][j] != null) {
// store clipping properties
int oldClipX = g.getClipX();
int oldClipY = g.getClipY();
int oldClipWidth = g.getClipWidth();
int oldClipHeight = g.getClipHeight();
g.setClip((j * dx) + 1, i * dy, dx - 1, dy - 1);
g.drawString(data[i][j], (j * dx) + 2, ((i + 1) * dy) - 2,
Graphics.BOTTOM | Graphics.LEFT);