Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9226757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:54:24+00:00 2026-06-18T04:54:24+00:00

Hi I am trying to present user with a simple Jframe where the user

  • 0

Hi I am trying to present user with a simple Jframe where the user sees images of the top 10 MMO’s.
I already have a simple html file where the images bring the user to the correct games web URL.

    public static void main(String[] args) throws Exception {
    String url = "exmaple web address etc http//..";
    JEditorPane editor = new JEditorPane(url);
    editor.setEditable(false);
    JScrollPane pane = new JScrollPane(editor);
    JFrame frame = new JFrame("Top 10 MMO's");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(pane);
    frame.setSize(400, 300);
    frame.setVisible(true);

    public void HyperLinked(HyperlinkEvent e) throws URISyntaxException {
    if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
        if (Desktop.isDesktopSupported()) {
            try {
                Desktop.getDesktop().browse(e.getURL().toURI());
            } catch (IOException | URISyntaxException e1) {
            }
        }
    }
}

Example html code the contains images each with its own clickable web adress

            </p>
            <p>
                <h4>Dungeons and Dragons</h4>
                <a href="http://www.ddo.com/" target="_blank"><img src="images/ddo.jpg" alt="Dungeons and Dragons Online" width="351" height="144" border="0" /></a>
            </p>
            <p>
                <h4>Lord of the Rings</h4>
                <a href="http://www.lotro.com/en?lang=en_GB&" target="_blank"><img src="images/lotro.jpg" alt="Lord of the Rings" width="351" height="144" border="0" /></a>
            </p>
            <p>
                <h4>Aion</h4>
                <a href="http://www.aionfreetoplay.com/website/" target="_blank"><img src="images/aion.jpg" alt="Aion" width="351" height="144" border="0" /></a>
            </p>
            <p>

Image example below am not allowed post as new user rules etc
http://s14.postimage.org/7xt52lbox/mmoset.jpg

I am able to display the images and I know they are clickable and work its just in the JFrame I am unable to click on them, wondering do I need to add a mouse click or something?

I’d appreciate feedback or some help, thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:54:25+00:00Added an answer on June 18, 2026 at 4:54 am

    You almost got it.

        editor.addHyperlinkListener(new HyperlinkListener() {
            @Override
            public void hyperlinkUpdate(HyperlinkEvent e) {
                if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                    if (Desktop.isDesktopSupported()) {
                        try {
                            Desktop.getDesktop().browse(e.getURL().toURI());
                        } catch (IOException | URISyntaxException e1) {
                        }
                    }
                }
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to create a simple application that will let the user
I'm trying to present a simple message to the user in my mobile website.
I'm trying to present the user with a list of links (properties: Title, url,
I'm trying to present the details of any file under Ubuntu using C .
I am trying to present a modal view controller. I have read the documentation,
I'm building a simple html menu with unordered lists and I'm trying to prevent
Firstly apologies if this is really simple but I have spent hours trying and
I'm trying to prevent user from inserting * in a textbox. This is what
I can't get this to work. I am trying to prevent a user to
I'm trying to do this in a way that will prevent end-user browser security

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.