The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


can I use setBaseFontSize(int) from StyleSheet class in jdk1.3?

Posted by Rach on December 11, 2001 at 1:14 AM


It's about StyleSheet again. I just want to know if I can use method setBaseFontSize() in StyleSheet class to set the base font size of HTML.

My objective is to set the base font size in stylesheet so that when the HTML page is loaded, it will intepret the relative font size according to that base font size.
To be more specific, suppose I set base font size in stylesheet to be 3, so when the HTML page is loaded, wherever the relative font size is specify (such as -1, +2), it will change into the absolute size (in this case: 3-1=2, 3+2=5)....

I have tried to use stylesheet.setBaseFontSize(int) in both jdk1.3.1 and jdk.1.4.0... but I could not get it work.. anyone knows how to do this?

Thanks so much,


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us