(keitai-l) Calling Paint method from Panel

From: Dibyendu <dibyendu.bhattacharya_at_eximsoft.com>
Date: 11/26/01
Message-ID: <005401c17642$f71174c0$800a0a0a@exim.com>
Dear sir ,
How do I call Paint(Graphics g) method from a class which extends Panel .
Panel extends Frame , and Paint(Graphics g) is a protected method of Frame
class .

I wrote a code like this , and I want to call this paint from my class which
extends Panel .

 public final static String MESSAGE="Hello !!";


 public void paint(Graphics g)

 {

       Font font =   Font.getFont(Font.STYLE_BOLD );
      g.setColor(com.nttdocomo.ui.Graphics.BLUE);
      g.setFont(font);
      g.drawString(MESSAGE,
      getWidth ()/2-font.stringWidth(MESSAGE)/2,
      getHeight()/2-font.getHeight()/2+font.getAscent());

 }

When I run my application , nothing is displayed , I think it is not calling
this method ....

Please reply ...
Dibyendu .




[ Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ ]
Received on Mon Nov 26 08:22:34 2001