Getting Hyperlink from a JTree

Hello,
Let\'s say I have a XML/RSS feed added to a DefaultMutableTreeNode in the format of hyperlink in a html tag.
Which by the way shows up in the tree as a hyperlink. Now I am trying to get the hyperlink from it so that I can process it. The only working way I know is to use HyperlinkEvent on a JEditorPane using HyperlinkListener, but no way from JTree, but is it possible to get the link directly from the JTree? THe closest I can get to the link is by using TreeSelectionListener, but I only get the formatted link not the raw link.
It contains hyperlink of news feed, for example,
DefaultMutableTreeNode news = new DefaultMutableTreeNode("News");
news.add(new DefaultMutableTreeNode("<html><a href='http://www.news.com/2547-1001_3-0-5.xml'>Cnet</a></html>"));
news.add(new DefaultMutableTreeNode("<html><a href='http://feeds.feedburner.com/popularscience'>PopSci</a></html>"));
So when I click on it, I want it to send the link to my FeedReader class to parse it and format the feed into a html table and display it on one of the JEditorPane.
Also I'm trying to use a progress bar while the data will be processing. See if any one of you would know how.
.thanks

Anyways, if any one of guys know how to load html faster with jeditorpane. Instead of using setPage/setText, by using HTMLEditorKit or any other way.
The link claims to have a solution but it doesn't shows it how: http://books.google.com/books?id=E0HGXKrxcS8C&pg=PR17&lpg=PR17&dq=load+html+faster+with+jeditorpane&source=web&ots=jd5W8FTqH3&sig=UmHxwj4kcKEVrI_vrHRxpjHr4-c

Similar Messages

  • Keynote refuses to link when hyperlinking from text to keynote file

    I can get hyperlinks from shapes to link, but text links won't link. Suggestions?

    The linking should be the same. Are you able to even add a hyperlink to the text or does the hyperlink just not work when you play it back? If you are able to highlight the text and add the hyperlink, does it underline the text afterwards?

  • Hyperlinks from other placed indd documents or pdfs getting lost after export to PDF

    after upgrade vom CS 5.5 to CS 6: hyperlinks from other placed indd documents or pdfs getting lost after export to PDF
    I tried all options for the as well known and working export options

    after upgrade vom CS 5.5 to CS 6: hyperlinks from other placed indd documents or pdfs getting lost after export to PDF
    I tried all options for the as well known and working export options

  • Can't Get Hyperlink To Work From One iWeb Site To Another

    I created a "family" website, including a blog page. In a recent blog, I briefly announced that my two nieces just completed a two-week adventure in the African bush. I have created a second website using iWeb which is a simple photo page. I had hoped to hyperlink from my blog entry by saying that anyone interested in seeing the pictures of their trip "click here". I then used the Insert>Hyperlink>Choose dialog to place the URL of the second site as the hyperlink file.
    No such luck. When the "click here" hyperlink is clicked in site #1 to navigate to site #2, all one gets is an error message.
    Anyone have any ideas?
    Desktop G4   Mac OS X (10.4.4)  

    I found out what I was doing wrong. In the hyperlink window I was trying to type in the URL for the second website on iWeb. Instead, there are pull down menus to permit the selection of another iWeb page or site as the link. It's working smoothly now.

  • How to get back from a hyperlink?

    The hyperlinks that can be inserted in iBooks Author work great in the direction out, at least from what I can tell in preview: There is a 'folding-over' animation that gets you from the book page to the website. But I find the reverse awkward: All I could do was hit the home button to get to the app screen and then hit iBooks again, which gets me back to the page I left. Is there a more elegant, i.e. one-step,  way of doing this? It may be that this is a standard procedure (switching back to the preceding app) for people who are used to apps on the iPad--I am new to it. I have just completed my first ebook with iBooks Author...

    This is the answer I received in a different thread from D. Bourne:
    Four fingers from right to left gets you back to the iBook. I would think it could get confusing with more apps but just gping between the two should be useful. Getting back to links within the book is not as easy (??).

  • Getting hyperlink formula from field objects.

    Hi everyone,
    I'm looking to extend the export to .pdf functionality in order to include hyperlinks. I have already ran some proof of concept programs, and I'm able to export to .pdf and add a hyperlink to a rectangular area of an existing .pdf document. The only thing left is to be able to pull the information regarding field location, size and hyperlink from the report.
    So, that's my question; How do I loop through the fields of an existing crystal report, check for hyperlink formula field, then get the link text/field position and size?
    I know that I'm asking for a lot here... I don't need full code samples, just some hints where to start... for example:
    - Where do I find the collection of generated data field objects?
    - Where do I find the hyperlink text on those objects?
    Thanks, in advance, for any help that you may be able to offer.
    - Scott

    Hi Scott,
    The first place I go is to the .NET Object browser. You have to add all of the CR Assemblies to get all of the info but it's a great place to start:
    Just search on "hyperlink" and you get this first hit and a few more:
    CrystalDecisions.CrystalReports.ViewerObjectModel.ReportObjectInstance.HyperLink
    CrystalDecisions.Windows.Forms.ObjectInfo.Hyperlink
    CrystalDecisions.ReportAppServer.ReportDefModel.ISCRObjectFormat.HyperlinkText
    CrystalDecisions.ReportAppServer.ReportDefModel.ISCRObjectFormat.HyperlinkType
    Here's what I typically include in my projects for testing:
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.ReportDefModel;
    using CrystalDecisions.ReportAppServer.CommonControls;
    using CrystalDecisions.ReportAppServer.CommLayer;
    using CrystalDecisions.ReportAppServer.CommonObjectModel;
    using CrystalDecisions.ReportAppServer.ObjectFactory;
    using CrystalDecisions.ReportAppServer.DataSetConversion;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    using CrystalDecisions.ReportSource;
    using CrystalDecisions.Windows.Forms;
    Then go to help.sap.com and get the latest SDK Help files. Or if you are using VS 2010 then use the local install of it.
    Thank you
    Don

  • How to get a TreeNode from a JTree

    Hi,
    I'm trying to get a TreeNode from my JTree.
    I have problems getting it.
    I can get the selected object but it is not a TreeNode .
    I need it because I need the node's children.
    What I mean is - if I do the next :
    TreePath treePath = tree.getSelectionPath();
    Object o = treePath.getLastPathComponent();
    if( o instanceof TreeNode ) {
    System.out.println("YES");
    else
    System.out.println("NO");
    I get the "NO".
    Thank's,
    Bnaya.

    hi,
    Can u pls jus cast into TreeNode!!!
    Object o = (TreeNode)Treepath.getlastPathComponent();
    if()
    thank u ...
    Shalinipriya.
    }

  • I'm trying to get a TreeNode from my JTree.

    Hi,
    I'm trying to get a TreeNode from my JTree.
    I have problems getting it.
    I can get the selected object but it is not a TreeNode .
    I need it because I need the node's children.
    What I mean is - if I do the next :
    TreePath treePath = tree.getSelectionPath();
    Object o = treePath.getLastPathComponent();
    if( o instanceof TreeNode ) {
    System.out.println("YES");
    else
    System.out.println("NO");
    I get the "NO".
    Thank's,
    Bnaya.

    Try this code:
    DefaultMutableTreeNode node =(DefaultMutableTreeNode)myTree().getLastSelectedPathComponent();
    if (node == null) return;
    Object nodeInfo = node.getUserObject();

  • Is a Windows registry error responsible for Firefox opening two browser windows whenever I use a hyperlink from a Word file?

    Whenever I use a hyperlink from an MS Word document, Firefox opens two windows instead of one. The first window is the one I need. The second contains a message that the page could not be found and the address bar contains the URL appended with "Firefoxhtml/shell/open/command".
    This problem is similar but NOT identical to one in MozillaZine headed "Windows error opening internet shortcut or local HTML file - Firefox". But none of the solutions in that article work for my problem: I've disabled all extensions but that hasn't helped. I've tried editing file types so that the DDE is removed (I'm not a teccie so have no idea what that means), but after following the instructions to the letter it doesn't seem to remove the DDE. Also I read that removing the DDE is not a good idea for people like me who need to open numerous firefox browser windows at one time. Furthermore, the MozzilaZine article refers only to problems opening a URL link in a MS Outlook email when Firefox is NOT running. My problem concerns the opening of URL links in MS Word when Firefox IS running!
    I've run countless different virus programmes, rootkit checkers etc but they all come up blank. However, I did come across guidance on this website: http://antivirus.about.com/od/windowsbasics/a/shellopen.htm which suggests that something may have altered the shell open command for two registry keys used by Firefox.
    # HKEY_CLASSES_ROOT\htafile\shell\open\command
    # HKEY_CLASSES_ROOT\htfile\shell\open\command
    The default value for each of these should be "%1" %*. But on my user, the default value reads:
    (for htafile) c:\windows\system32\mshta.exe "%1"%*
    (for htfile) c:\programfiles\windowsNT\hypertrm.exe"%1
    What should the value be for these two files?
    Can anyone sort this for me please? Bear in mind I'm not a teccie!

    Do a malware check with a few malware scan programs.<br />
    You need to use all programs because each detects different malware.<br />
    Make sure that you update each program to get the latest version of the database.
    *http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    *http://www.superantispyware.com/ - SuperAntispyware
    *http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    *http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    *http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

  • Hyperlink from PL SQL Report to a branch

    Hi,
    Is there a "good" way to hyperlink from PL SQL report to a branch?
    I cant use the regular report, as there is a lot of data and I need to control the layout.
    I would like to go to another page and pass data to one known field.
    Have tried googling and I found this page:
    http://www.lucidprocess.com/blog/building-hyperlinks-in-oracle-apex-reports/
    But it seems a bit "hacky", eg.. many places to edit if the page where to move or change in the future (or if one copies the page).
    Is there a more "clean" way to do this, or does one have to get his/her hands dirty for such a task?

    Thank you.
    I managed to write the other code too:
    "f?p='||:APP_ID||':686:'||:APP_SESSION||'::'||:DEBUG||'::P686_TBNR,P686_VIS_REGISTER:'||oppdrag.PE_TBNR_BET||'%2CHUSKNYTT"instead of firing the branch and using JS, I just set the two fields that change the logic and basis of the page. However as you see, the "flaw" with the code I wrote, is that if the fields or anything were to change, it will be harder to go in and edit reports that have this type of code.
    Have just started with APEX, but I must say I like it a lot..
    Just wish there where something inbetween the sql reports and the pl sql reports..
    The possibilities of the PL SQL Reports meeting the SQL Reports flexibility would be super.
    However, maybe it's good not everything is served on a plate, as this forces me to learn it more in depth. I also love challenges and I like making things properly :-)

  • Hyperlinks from email, pdf and word no longer work to connect to that webpage, though they work in IE.

    I think I recently updated firefox, in any case, I do when requested. Just in the last few days, I can no longer make hyperlinks work from email, word or pdf documents. I have to cut and paste the url. I tried doing the reset under troubleshooting, but it did not work. I tried setting the network connection to auto detect, but that did not fix it either. As I can get hyperlinks to work with internet explorer, I assume it is something with firefox. I am not a particularly savy computer user, so clear instructions would be much appreciated. Thank you.

    Try to redo the default browser (i.e make IE the default and then let Firefox do it again).
    *http://kb.mozillazine.org/Default_browser
    *https://support.mozilla.org/kb/How+to+make+Firefox+the+default+browser
    *https://support.mozilla.org/kb/Setting+Firefox+as+the+default+browser+does+not+work
    You can also check for problems with DDE.
    *http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox

  • Hyperlinks from Outlook are no longer working since updating to 8.

    Hyperlinks from Outlook are no longer working since updating to 8.
    I get a pop-up with "URL" An error occurred in sending the command to the application.

    Well, I've had to downgrade to Firefox 4.0 in order to get hyperlinking back.

  • Viewing a url selection from a JTree

    Hi,
    I was just wondering if someone can give me some help. I am trying to get a selected node from a JTree which is a url which has been converted into a string to add to the JTree. I use the following code to obtain the selected node by the user:
    TreePath node = tree.getSelectionPath();
    System.out.println(node);I have used system.out.println to see what is actually retreived. The following is retrieved from the tree:
    [Test, http://www.whatever.com]
    test is the node of the tree, all I want is to remove the root from the selection and get the url so I can connect to the net to display the page. How would i do this?
    Many Thanks

    Hi,
    This is the code that I have used:
    TreePath node = tree.getSelectionPath();
    DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)
    (node.getLastPathComponent());
    System.out.println(currentNode);Found an example, I learn better when I see examples. Do you know anything for connecting to the web to view the url or anywhere where i can find an example?
    Many Thanks
    p.s. sorry for snapping my deadline is at the end of the month and got lots of write up to do as well :(

  • How to read HyperLinks from pdf file??

    hi developer's,
    I am in PDF processing... I am having doubt in that Processing.
    How to read Hyperlinks from PDF file?
    I can able to set the hyperlink.. But i cant able to get the hyperlinks..
    The following example program will set the hyperlink to the PDF file using lowagie API..
    import com.lowagie.text.Anchor;
    import com.lowagie.text.Chunk;
    import com.lowagie.text.Document;
    import com.lowagie.text.DocumentException;
    import com.lowagie.text.Paragraph;
    import com.lowagie.text.html.HtmlWriter;
    import com.lowagie.text.pdf.PdfReader;
    import com.lowagie.text.pdf.PdfWriter;
    public class Argu1 {
         public static void main(String[] args) {
              Document document = new Document();
              try {
                   PdfWriter pdf = PdfWriter.getInstance(document,
                             new FileOutputStream("PageLink.pdf"));
    PdfReader pdf_read=new                
                   document.open();
                   document.add(new Paragraph("Hi Everbody....!"));
                   Anchor pdfRef = new Anchor("Click Me");
                   pdfRef.setReference("www.java2s.com");
                   Anchor rtfRef = new Anchor("Touch Me");
                   rtfRef.setReference("www.sun.com");
                   System.out.println(rtfRef.reference());
                   document.add(pdfRef);
                   document.add(Chunk.NEWLINE);
                   document.add(rtfRef);
              } catch (DocumentException de) {
                   System.err.println(de.getMessage());
              } catch (IOException ioe) {
                   System.err.println(ioe.getMessage());
              document.close();
    Help me how to read the Hyperlinks from the PDF file using java ...
    Thanks in advance,
    With Regards,
    J.Imran

    Instead of cross-posting unformatted code you could have taken a look at the API, because there you might have come across a method named getLinks...Even though it's not documented, I really suspect that it will return the Hyperlinks on a given page.

  • How do you get Hyperlinks to work in MAIL signature?

    Hi,
    I need help.....How does one get Hyperlinks to work in MAIL signature?..when I do this is turns blue and IS underlined (as usual) but the link doe not work ..any thoughts???..
    also any one have ideas on how to select and group email from the same source in MAIL (like EUDORA does)...???
    thanks in advance
    IMac G5   Mac OS X (10.4.8)  

    sonic,
    There is a known bug in Mail 2.1 associated not only with the inclusion of hyperlinks in sigs., but also the association of sigs with accounts.

Maybe you are looking for

  • Como faço para sincronizar mais de uma conta de email no Firefox Sync para Android?

    Olá. Tenho instalado o firefox 34.0.1 para android no celular. Tive que desinstalar por causa de um travamento e ao reinstalar perdi duas contas que eu sincronizava. Agora somente um email está sincronizado e sou obrigado a entrar nos emails por nave

  • AS03 search display

    Hi, We are upgrading from 4.6C to ECC 5.0. In ECC5.0, in AS03 when i press F4 in asset filed, the search screen does not display the tab Asset via company,serial number.  How to enable to this tab. Expecting your reply, venkat

  • Changing date for a JVM

    hello I have a problem related to the system date (the date from JVM) How can I change dynamically the date of a JVM? my problem: I have to create a test case for a trigger I want to create an object, and I need to change the date to see the result I

  • JNI/Java vs Word (.Doc)

    How can I run MS Word from JNI? <br> Or How can I use some library for working with MS Word? Libraries that eplane in another threads doesn't work. It show me error that no object is created or cocreate object error.<br> If somebody know how to get M

  • OBIEE 11g - change bar graph result to "rectangle" instead of "gradient"

    Hi, I'm a big believe in Stephen Few's theory that anything that adds extra ink and/or causes visual distraction is poor design for presenting information. I've already figured out how to remove the shadow effect from all graphs (by setting visualEff