What's wrong with using setFont, an if condition and the appropriate listener, in this case a CaretListener?
final JTextField field = new JTextField();
field.addCaretListener( new CaretListener() {
Font big = new Font("Verdana", Font.PLAIN, 13);
Font small = new Font("Verdana", Font.PLAIN, 9);
public void caretUpdate(CaretEvent e) {
if(field.getText().length() > 30) {
field.setFont( small );
} else {
field.setFont( big );
}
}
} );
ICE