Could someone please tell me how to hyperlink to a page? Say if I had a combobox and the user selected an item, how could I hyperlink to a page?

Recommended Answers

All 2 Replies

Hi everyone,

Add a listener for that jcombobox. When the user clicks it get the selected vlaue(assuming it is an address for the we page) cast it to a string and put it into the url class. After that put a jtextpane into a jframe and set the jtextpane to that url and set the jframe visible.

Richard West

Thanks but I finally got this figured out. The program I'm working on is an applet and applets offer easy methods to do this. I was making things harder than they were.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.