source:
trunk/j/src/bsh/commands/setFont.bsh
@
2
Last change on this file since 2 was 2, checked in by , 18 years ago | |
---|---|
File size: 313 bytes |
Rev | Line | |
---|---|---|
[2] | 1 | |
2 | bsh.help.setFont = "usage: setFont( Component comp, int ptsize )"; | |
3 | ||
4 | import java.awt.*; | |
5 | ||
6 | Font setFont( Component comp, int ptsize ) { | |
7 | font = comp.getFont(); | |
8 | f = font.getFamily(); | |
9 | s = font.getStyle(); | |
10 | font = new Font( f, s, ptsize ); | |
11 | comp.setFont( font ); | |
12 | comp.validate(); | |
13 | return font; | |
14 | } | |
15 |
Note: See TracBrowser
for help on using the repository browser.