Philippe Carriere
Philippe Carriere

Reputation: 3720

URL in JOptionPane

How can I add a clickable URL into a JOptionPane (in the middle of a text) ?

Upvotes: 4

Views: 1298

Answers (1)

camickr
camickr

Reputation: 324118

You can add any component to a JOPtionPane. So you can add a JEditorPane containing HTML with your clickable URL. That is the "message" Object which is passed as a parameter to the showXXX methods can be a Swing component.

Upvotes: 4

Related Questions