How can I active link in JEditorPane

I wana active my link on README.HTML file to going up down in my file or go to another html file here is my code:
import javax.swing.*;
import java.awt.*;
import java.io.*;
public class EditorPaneEx
     public EditorPaneEx()
          JEditorPane editorPane1 = new JEditorPane();
          editorPane1.setEditable(false);
          java.net.URL helpURL = TextSamplerDemo.class.getResource("README.html");
          if (helpURL != null)
               try
                    editorPane1.setPage(helpURL);
               catch (IOException e)
                    System.err.println("Attempted to read a bad URL: " + helpURL);
          else
               System.err.println("Couldn't find file: README.html");
               editorPane1.setText("Error. Unable to load README.html file.");
          JScrollPane editorScrollPane = new JScrollPane(editorPane1);
          editorScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
          editorScrollPane.setPreferredSize(new Dimension(250, 145));
          editorScrollPane.setMinimumSize(new Dimension(10, 10));
     //     JEditorPane editorPane2 = new JEditorPane("text/html", "<b>Help</b>");
     //     editorPane2.setEditable(false);
          JFrame aFrame = new JFrame("JScrollPane TEST");
          aFrame.setSize(400, 350);
//          aFrame.getContentPane().add(editorPane2, BorderLayout.NORTH);
           aFrame.getContentPane().add(editorScrollPane);
           aFrame.setVisible(true);
           aFrame.setLocationRelativeTo(null);
           aFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      public static void main(String[] args)
          new EditorPaneEx();
}          I must input somthing like this:
class Hyperactive implements HyperlinkListener {
public void hyperlinkUpdate(HyperlinkEvent e) {but I can't understand how exacly make it work, plz If someone know the solution send the code. thank you for your time.

Read the API for example code.

Similar Messages

  • How can i create link between ipad(xcode) and webserver?

    Hi, I'm a new to iPad development and i need help,
    i'm not good with english but i try to explain my question:
    how can i create link between ipad(xcode) and webserver?
    (the webserver ".NET" with driver odbc is connected with DB Oracle)
    so, how can my ipad application access to the Oracle DB?
    Create a webservice (.NET) to be place between iPad and DB, is this correct?
    how can i do it?
    which are libraries to include in the xcode's framework?
    thx

    I think the following URL will be your best answer:
    http://stackoverflow.com/questions/3510468/connecting-iphone-to-an-odbc-database

  • How can I do link forgot user id when login to portal.

    In portal when login user can click logon help if he forgot his password. forgot password link in portal logon page | SCN But what if user forgot his user id? How can I do link in whitch on users id mail send his user id.

    Websites remembering you and automatically log you in is stored in a cookie.
    *Create an allow Cookie Exception to keep such a cookie, especially for secure websites and if cookies expire when Firefox is closed.
    *Tools > Options > Privacy > Cookies: Exceptions
    In case you are using "Clear history when Firefox closes":
    *do not clear the Cookies
    *do not clear the Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.
    Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception and cookies from plugins.

  • How to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?

    how to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?
    == This happened ==
    Every time Firefox opened
    == Always

    Check with your web mail service provider for help with that issue.

  • How to send active links in email from firefox

    how to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?
    == Operating system ==
    Windows 7

    Check with your web mail service provider for help with that issue.

  • My contacts are not updating from the iCloud. How can I actively go and retrieve them?

    My contacts are not updating from the iCloud even with "push" on. How can i actively go and retrieve them?

    Hello there, Lk354.
    The following Knowledge Base article offers up some great recommendations for troubleshooting issues with using iCloud Contacts:
    Get help using iCloud Contacts
    http://support.apple.com/kb/TS3998
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • How can I active  send by email button in reader

    Send by email button works perfectly in acrobat pro. But it does not work in reader.
    How can I active send by email button in reader?
    Please Suggest me......

    Thanks to join  in this field.
    I have got answer.

  • How can I add links to open xml and csv files stored in another location? Please advice how to place links in my frame maker document?

    Hi,
    I would like to know as to how can I add links to open xml and csv files stored in another location? Please advice how to place links in my frame maker document?
    Kindly advice.
    Thanks
    Priya

    Special > Hypertext > Command "open document" will do its best to open the target document inside FrameMaker, which may not be much help; Special > Hypertext > Command "message …" will use the application you specify. The user guide for 7.0 says this about absolute links, and I don't think anything has changed since:
    For example, to start PaintBrush and open the Ship.pcx file on drive C you would use the command message system pbrush.exe C:/Ship.pcx
    I've not often used a relative link, and not recently: the same source says
    folder levels are separated by a slash / even in Windows and Mac
    [relative links] FrameMaker searches for a relative pathname beginning in the folder that contains the current document
    [absolute links] FrameMaker searches for an absolute pathname beginning at the top of the file system. In Windows, the absolute pathname begins with the drive specifier, a colon and a slash.

  • I am a small woman with huge wrist circumference, 177.6mm.  If I order the black men's stainless steel watch how can I take links out if needed?

    I am a small woman with huge wrist circumference, 177.6mm.  If I order the black men's stainless steel watch how can I take links out if needed?

    We are just users here, so we have no way of knowing...
    I am sure that any question that is not easily found at or from the Watch Store page > http://store.apple.com/us/watch < can be answered by this method (from the bottom of that page)
       Chat with a Specialist
    Get all your Apple Watch questions
      answered or get help finding the
    right watch. Call 1-800-MY-APPLE
    ÇÇÇ

  • When i click on a link in my fb feed it opens in fb app. How can i get links to open in safari or youtube?

    How can i get links in my fb feed to open up in safari or youtube rather than fb app?

    Go to FB's support site. That is controled by the FB app.

  • How can i activated ipad 3

    hello
    i am hossein from iran
    i buy iPad 3G from dubai
    i restore ipad on dubai and activate not were problam about today i restore my ipad after i see is not activation item on setting how can i activation my ipad pleas help me
    Message was edited by: iHo3in
    < Edited by Host >

    I do not understand you question or history. Is this your history and question:
    - You successfully purchased and activated your iPad in Dubai.
    - When you got back to Iran you had a oroblem. What was the problem?
    - Dis you try to restore it using your computer in Itan?
    - Do you have an Apple account?
    - Was that account used in Dubia?
    - Did you use that same account when you tried to restore it in Iran?
    Other pertinent information may help too.

  • TS3694 How can I active iphone 3G WITH ERROR 1015

    How can i active iphone 3g with error 1015?

    A 1015 error usually indicates that the iPhone has been jailbroken. Has yours? If so, we can provide no help with jailbroken iPhone in these forums, so you will have to look elsewhere for assistance.
    Regards.

  • How can I active the "Cluster/This Computer" option in Compressor?

    When I try to export with Compressor, I select the "Submit" button, open the last window where the Cluster option appears without "This Computer" selection and stops the exportation process. How can I active it? Thanks

    What version of Final Cut Studio, Compressor, Mac OS X do you have?

  • Hi i ve found an iPhone 4s in mauritius Island .i live un France and the original carrier is africa flex orange. How CAN i activated the phone? I tried with an orange french sim but it doesn t work. Tks for helping me

    Hi i ve found an iPhone 4s during hollydays
    In mauritius Island . The original carrier is
    Africa flex orange mauritius . How CAN i
    Activated it?
    As i live in France i tried wz an orange s'il
    But it doesn t work
    Tks for your help

    Well, no it probably won't work because the phone is locked so there is nothing you can do.
    You won't be able to activate it, so you might never be able to use it.
    You have been dishonest here and if you found a phone, then someone had obviously lost it, so you should have handed it in to the police rather than keeping it for yourself. 
    You probably won't be able to use the phone because it sounds like the phone is locked to the carrier in Muaritius and if you don't own the phone and don't have a contract, then that carrier will problably not unlock the phone for you, so you now have a paperweight that you can't use.
    You get no help here for dishonest practices and you won't be able to activate or use that phone.

  • How can i active my i phone on other sim card didnot come with and in anther country

    how can i active my i phone on other sim card didnot come with and in anther country

    It will not work with an egyptian SIM unless it is first unlocked first by Vodafone UK. Only Vodafone UK can unlock your phone. Contact them.

Maybe you are looking for