加下划线的JLabel

我试图让JLabel强调。 我到处搜索,但我一无所获。 即使在属性中,也没有选项来强调JLabel。 我能做什么?

JLabel label = new JLabel("YOUR TEXT HERE"); label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); 

要么

 JLabel label = new JLabel("Underlined Label"); Font font = label.getFont(); Map attributes = font.getAttributes(); attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); label.setFont(font.deriveFont(attributes)); 
 JLabel label = new JLabel("Underlined Label"); Font font = label.getFont(); Map attributes = new HashMap<>(font.getAttributes()); attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); label.setFont(font.deriveFont(attributes));