![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
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.
Message:
Hi! Does anyone know how I can set the font size of the html text? Suppose I want to set the string "hello" to be +3 in size, I know that in html we can write as below: hello This is what I have done to change the size of the text to be +3 but it was wrong. private static final String[] FONT_SIZE = { private static final Action[] SIZE_ACTION = { And in my JPanel, I added this final JButton sizeButton = new JButton("size"); When I clicked on the sizeButton, it will popup the sizeMenus that I can choose the size from smallest to largest. But, it doesn't work correctly since it doesn't know what the size of the negative numbers is. And even the positive numbers, it doesn't intepret the size as an html text correctly. Instead, it inteprets as a plain text that has the size of 1, 2, and 3. (which are very very small) Does anyone know where I have to make change? I think I have to use something else which is not "StyledEditorKit.FontSizeAction" but I have no clue what should it be right now. Thanks so much,
Replies:
|
Sponsored Links
|