Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dimension of the applet

Status
Not open for further replies.

tzzdvd

Programmer
Aug 17, 2001
52
IT
Hi

Is it possible (and how) to dimension an applet in function of the text written in it?

For example: I want to write "Hello World!" in font "Times new Romans" size=12. I want that the applet can resize itself to the minimum dimension in which can be written "Hello World!"

Thank's for all

Davide
 
The only thing I can think of is to use asp,jsp,php,etc. to dynamically specify the applet size during page creation. However, this assumes that the html "knows" how big the applet should be.
 
That is the problem!!!!!
HTML doesn't know the dimension (heigth and width) of the applet!!!! Ant its dimension can change run-time.
But, reading your post, I think what I want to do is impossible.

Thank's
Davide
 
Depending on what kind of "Frame" your applet is operating in, you might be able to call the pack() method for the layout manager.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top