declare
Image img;
in constructor
try{
img=Image.CreatImage(100,100);
Graphics graphics=img.getGraphics();
graphics.setColor(20,50,100);
graphics.drawString("Hello There !",0,0,0);
graphics.setColor(255,0,0);
graphics.drawRect(0,0,99,99);
}
catch(IOException e){}in paint
g.drawImage(img,5,10,0);
sorry if there is errors cause i'm at net cafe
