Thanks for Replying,
Originally posted by Madhav Lakkapragada:
Pl. Check up Font.getFont();
Re the first qstn, I don't getit. Could you pl. elaborate on
what you are trying to do....?
Also, when a method is deprecated, a work-around is generally provided.
[This message has been edited by Madhav Lakkapragada (edited March 11, 2001).]
I want to build a Panel with a border and a titlestring in the upper left corner. To ensure correct layout I think i have to change the insets according to the FontMetrics of the selected Font. The FontMetrics question is answered as I found getFontMetrics(Font) in Component (don't know why I first used Toolkit.getFontMetrics(Font)).
The second question arises because getFont() returns null until the Component is visible. getInsets() gets called before the Component is visible. So I need to know which Font will be used when there is no Font explicite specified by calling setFont(Font).
Thanks