Class GridPanel  - simple grid

class GridPanel extends Panel
public class GridPanel extends Panel

constructor. Parameters name are self explained:
public GridPanel(int width, int height, int how_many_rows, int how_many_cols, int row_height, int col_width)

set foreground color for cell. Rows and cols numbers started from 1 (not 0 !). Default color is black
void setCellColor(int row, int col, Color c)

set background color for cell. Rows and cols numbers started from 1 (not 0 !). Default color is white
void setCellBackground(int row, int col, Color c)

set value for cell
void setCellValue(int row, int col, String value)

get value for cell
String getCellValue(int row, int col)

get foreground color for cell
Color getCellColor(int row, int col)

get background color for cell
Color getCellBackground(int row, int col)

clear grid
void ClearCells()
 



code for this applet
 

Comments, suggestions ?