source: trunk/j/src/bsh/commands/setFont.bsh @ 2

Last change on this file since 2 was 2, checked in by piso, 18 years ago

Initial checkin.

File size: 313 bytes
Line 
1
2bsh.help.setFont = "usage: setFont( Component comp, int ptsize )";
3
4import java.awt.*;
5
6Font 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.