Image Display Issue ! !
Hi all,
I am trying to display image but it is not showing .
I tried it out but till yet did not able to resolve this issue.
Iam sending Code plz check it out.
--
public class DataGridEx extends DataGrid {
final Command exitCommand = new Command("Exit", Command.EXIT, 1);
Image image = null, image2 = null;
Display display;
Graphics g;
MobileClientMIDlet myparent;
String userid;
String task;
public void setText(String text) {
this.setCellText(this.getActiveCol(), this.getActiveRow(), text);
repaint(this.getActiveRow() * getColumn(0).getColWidth(), 0,
getColumn(0).getColWidth(), RowHeight);
}
public DataGridEx(String title, int ColCount,Display display)
{
super(title,ColCount);
this.display=display;
addCommand(CMD_BACK);
setCommandListener(this);
}
public DataGridEx(String title, int ColCount,Display display,MobileClientMIDlet myparent,String userid,String task) {
super(title,ColCount);
this.display=display;
this.myparent=myparent;
this.userid=userid;
this.task=task;
try {
image = Image.createImage("/mansoftMobileSolution/images/manteam.JPG");
System.out.println("Working in Datagrid :at 2");
} catch (IOException e) {
e.printStackTrace();
}
setCommandListener(this);
// addCommand(exitCommand);
System.out.println("Working in Datagrid :");
try {
image = Image.createImage("/mansoftMobileSolution/images/manteam.JPG");
System.out.println("Working in Datagrid :at 2");
} catch (IOException e) {
e.printStackTrace();
}
}
//It show how user can call Command by key
public void keyPressed(int keyCode) {
super.keyPressed(keyCode);
if(keyCode==13 || keyCode==-5)
if(!RowSelect)commandAction(CMD_EDIT,this);
pointerPressed(36, 74);
}
//It show how user can draw current cell in footer
protected String getFooterValue(int col, int row) {
if(RowSelect) return super.getFooterValue(col,row);
String s=super.getFooterValue(currentX,currentY);
if(s == null) s="";
return s;
}
protected void DrawCell(int x, int y, boolean Selected, int Width) {
if(x>0) {
super.DrawCell(x,y,Selected,Width);
return;
}
}
}

