when i search internet i have found a way to underline font like this,
Font f=jLabel1.getFont();
Map<TextAttribute,Object> map = new Hashtable<TextAttribute,Object>();
map.put(TextAttribute.UNDERLINE,TextAttribute.UNDERLINE_ON);
f=f.deriveFont(map);
jLabel1.setFont(f);
it works well on jdk6, however it doesnt work on jdk5, and it doesnt warn about anything. first, how can i get same effect on jdk5? second, why is there a TextAttribute.UNDERLINE constant, if it doesnt work?