underline text in java without using html tags

can you plz tell me that how to underline text in java without using html tags,

sample code i tried but it is not working, Plz help

JFrame f = new JFrame("Underline Frame");

JLabel b = new JLabel("The font that doesnt get underlined");

Map m = b.getFont().getAttributes(); //Note I dont need to define which

System.out.println(m);

m.put( TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON);

m.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);

m.put(TextAttribute.SIZE, new Float(20));

b.setFont(b.getFont().deriveFont(m));

System.out.println(b.getFont().getAttributes());

f.getContentPane().add(b);

f.pack();

f.setVisible(true);

[731 byte] By [kami47a] at [2007-10-2 12:43:55]
# 1
This problem is fixed in the next version of Java (Mustang - 6.0).But for now you could do the following from [url http://forum.java.sun.com/thread.jspa?threadID=529801&messageID=2667179&start=7]this thread (that works)[/url].Regards
jfbrierea at 2007-7-13 9:51:03 > top of Java-index,Java Essentials,New To Java...