Making a hyperlink on JLabel to open a file

Hi,
I need some help with regards with hyperlink a JLabel. then it will open a certain file like a CSV file. I've been searching sites for a day. I hope you can help me this one.
Thank you.

here's the samle code I got on the web:Why wouldn't you read the API first?
If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
http://homepage1.nifty.com/algafield/sscce.html
Don't forget to use the "Code Formatting Tags", so the posted code retains its original formatting.
http://forum.java.sun.com/help.jspa?sec=formatting

Similar Messages

  • I am using excel to add hyperlinks to other documents. When I email the spreadsheet to another user the hyperlinks are lost "cannot open the file" error comes up. Any suggestions?

    Any suggestions on how to retain hyperlinks in a workbook after emailing to another user. The links to external documents were lost. However the links to other sheets within the book were retained.
    Alan

    Probably some form of corruption. If you already tried JetComp (http://support.microsoft.com/kb/295334) try copying objects to a new empty db. Chances are they all copy except for one. Of course you could
    go back to a backup as well, perhaps just to retrieve that failing object.
    -Tom. Microsoft Access MVP

  • Anyone else having problems making a hyperlink to a file in CS4?

    Anyone else having problems making a hyperlink to a file? 
    I have a document in CS4 that I'm exporting to pdf. When I create a hyperlink in CS4 to a file, I am getting the message when I click the link in the pdf ' Cannot find the file:C%5Document' etc. 
    When creating the link, File is selected, Shared Destination is unchecked & checking the link using 'Go to Destination' shows the link works. 
    In Acrobat 9 Pro, I've checked the properties of the link - when exported from CS4, the Link Properties - Actions are 'Open a web link' 'file:C:\Documents%20'etc whereas if the link is created in Acrobat the link properties are ' 'Open a file' 'file:C\Documents and Settings' etc, and it works. 
    Is this a bug or am I missing something?

    I'm only getting that to work with the catalogue & sample in the same folder. In any case from a useability standpoint using URL brings up the Security Warning & putting the catalogue pdf in the same folder as 100 sample pdfs makes it more difficult to locate.
    I'm at a loss to understand why the functionality of creating a link in InDesign cannot be the same as Acrobat; where you can select 'Open a file', browse to that file and the relative links are maintained when you burn to a disc. InDesign looks as if it will do the same but when you select File as the link & browse to the destination file but InDesign treats it as a URL & brings up the the web link cursor in the finished pdf. That still looks like a bug to me.

  • Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Yoh, what is FSCCommanr ? sorry man I am an absolute beginner in Flash. I tried the code:
    /* Click to Go to Web Page
    Clicking on the specified symbol instance loads the URL in a new browser window.
    Instructions:
    1. Replace http://www.adobe.com with the desired URL address.
       Keep the quotation marks ("").
    instance_name_here.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
    function fl_ClickToGoToWebPage(event:MouseEvent):void {
      navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
    this is the same code I used before and it opens a pdf file in a web browser, and it doesn't open an AutoCAD file.

  • HyperLink in JLabel

    How Can I create a HyperLink in JLabel ? is it possible ? plzz help ME..

    Do you want it to work, or just look like a hyperlink?
    I believe you can use html in a label by wrapping the text in <html></html> tags - e.g.
    JLabel myLabel = new JLabel("<html>my-link-html</html>");
    ...but to actually make it work is another story.
    I suspect you'd need at least an ActionListener to recognise the click and a HyperlinkListener to process the link, but that's way beyond anything I've done.
    Hope that helps a bit,
    Tim

  • How to make hyperlinks in PDF doc open in a seperate PDF window?

    I created a "Main" PDF document and have various attachments in it including PDF. I created them with Insert, Hyperlink.  That works, however, if I have the main document open in PDF, and I click on one of the hyperlinks to open a PDF document, the main document is closed and the only window remaining open is that of the hyperlink I've accessed.
    I want to change this to have the PDF hyperlink within main document  open in its on window ...can this be done?

    Thanks for the reply, but I have Adobe Reader 9 Pro. Will it still not 
    work ?
    Le 29 sept. 2011 à 29 sept. 11 - 16:09, Claudio González a écrit :
    Re: How to change text in PDF doc. which is a musical score
    created by Claudio González in Adobe Reader - View the full discussion
    Unfortunately, not with the free Reader.
    Replies to this message go to everyone subscribed to this thread, 
    not directly to the person who posted the message. To post a reply, 
    either reply to this email or visit the message page: [http://forums.adobe.com/message/3944833#3944833
    To unsubscribe from this thread, please visit the message page at [http://forums.adobe.com/message/3944833#3944833
    ]. In the Actions box on the right, click the Stop Email 
    Notifications link.
    Start a new discussion in Adobe Reader by email or at Adobe Forums
    For more information about maintaining your forum email 
    notifications please go to http://forums.adobe.com/message/2936746#2936746

  • Add hyperlink or button to open document in client application

    Good day.
    I have SharePoint 2013 and Office Web Apps 2013 integrated with it.
    I configured the default behavior when clicking on a document in a document library to open it in web app. 
    And I want additionally to have column in this library with hyperlink or button to open document in client application.
    I can click on menu near document name with WAC preview and then click "change" button. But in this case I make 2 clicks. So I want to have this  "change" button as a column in the list of document library.
    How can I do it?

    Hi, Daniel.
    I successfully created rich
    text type column - richtextcolumn.
    Then I created workflow associated with documents library and added action to set field in current element
    - it sets richtextcolumn with value you wrote - "<a class="ms-listlink ms-draggable"
    onclick="return DispEx(this,event,'TRUE','FALSE','FALSE','SharePoint.OpenDocuments.3','1','SharePoint.OpenDocuments','','','','1','0','0','0x7fffffffffffffff')" href="[%Current
    Item: Server Relative URL%]" DragId="7">test</a> .".
    I configured this workflow to run on element creating and editing.
    Then I upload a document and see link to this document appearing in richtextcolumn.
    But when I click this link it just download document and then open it in client application. So if I change something in this document and try to save it, it will be saved in my local download folder and not sharepoint.

  • Hyperlink in WebI document to open external files

    Hi all,
    I'm creating a WebI 3.0 document in Infoview and would like to know if it is possible to create a hyperlink on a drill down WebI report which will then open external file formats like PDF, TIFF, JPEG or etc. The external files reside outside BOE and they're in another system in DocuFlo.
    If yes, how can we do so? I've tried OpenDoc but got to realize that it doesn't work for external files. Is there a workaround for this?
    Hope my question is not too confusing. Thanks in advance.

    Yes Kuldeep, I could.
    But the situation that I have now is - the object that is carrying the data will open the relevant external document stored on the server.
    e.g. [State] is a dimension in my universe and the data could be US, UK and NY.
    When I activate the drill and click on US, it should open the US document. (http://servername/US.pdf)
    When I click on UK, it should open the UK document (http://servername/UK.pdf)
    My problem now is, when I click on any of the states, it opens the same document (http://servername/US.pdf). I'm running out of idea and solution
    Many many Cheers~

  • Hyperlink to open a file in a new window

    I have been trying to format the hyperlink to a file so it opens on a new window. iWeb allows us to check the box 'open in new window' only for links to external pages; when we insert a link to a file, I realize the app uploads the file to the website, but I could not find a way to have it open in a new window. Is there a way we can get to and format the hyperlink reference?

    1. Create the link that connects to the file (pdf or whatever) on a separate page of your site on iWeb.
    2. Publish your site, then go on the internet to the page that has this link. Keep this page open on your Safari or some web browser you use.
    3. Go back to your iWeb and create another link on a different page (home page, for example) of your site, and connect this link to the URL of the open page in step 2 with "Link to: An External Page" option. Click to choose "Open link in new window" on the Inspector panel. Name this link that has something to do with the file of interest in step 1.
    4. On your iWeb, go the page created in step 1 and make sure "include page in navigation menu" is not selected or checked in the Inspector panel so that web visitor will not get to this page directly.
    5. Publish your site. Now go to your site on the web to the page in step 3. Click on the link and it will open a new page with the link that has the file attached. Visitor can now open the file in that new window.
    • It seems complicated, but you'll get it.
    • You may need to refresh the pages on Safari to make it work if you have left Safari on throughout your work.
    • For this method, you have to dedicate a page to carry the link that connects to the file.
    Example: I create a page that has list of links to the files for viewing. These files are weekly reports. Each file is named by its date such "March 4, 2011" "March 11, 2011" etc.. This page will be hidden from visitors at first when they visit my site. Then I create on my home page a link called "Weekly Reports" that open to "External Page" via the option I have in Inspector. Even though it says "External Page" I use the URL of the hidden page containing all the actual files. On this "hidden" page, I also has a link called "Weekly Report" but this link is connected directly to this page. I do this only because I want the "hidden" page to look like my home page in terms of displayed links.

  • "open a file" hyperlink syntax, relative link

    Hello all,
      I regularly put reports together that consist of 1 report and many "supporting documents", all in PDF format.  Each page of the report has anywhere from 1 to 8 links on it (report comes from SQL Reporting Services).  These links point to their supporting document(s).  The report and supporting documents are burned to a CD to send out to our clients.  The report is opened in Acrobat, and when a link is clicked the supporting document is opened in a new window.
      I have tried every way I can imagine to format a link so that when the report is output to PDF the link shows up as an "open a file" link rather than a hyperlink.
      My question:  Since I know I can make an absolute URL hyperlink work correctly...and relative file links work correctly when I manually link to the files, what is the correct syntax to achieve a relative file link?
      The directory structure burned to CD:
               >CD Drive
                   >Main Folder
                        >PDF Report
                        >Supporting Documents Folder
                             >Document #1
                             >Document #2
    I have tried this javascript inside a SSRS expression:   (Pardon the code, I'm java-stupid)
    "javascript:void(window.open('FILE:\Documents\'" & filename-parameter &"'.pdf'"
    Bottom line:  I'm looking for a way to automatically link one PDF to many PDFs based on the above folder structure, given a variable that comes from SSRS.
    Thanks

    Matt,
      Well, I did end up with a not-so-elegant-but-workable solution.  Here's what makes it tick:
    1.  You'll need to construct the link to the target .PDF file (probably through SSRS).  You said that you are going to burn these files to CD, right?  If so, you'll probably want to construct something like [filename + .PDF], without brackets.  If your SSRS "list of PDF files" already looks like that you're that much further ahead.
    2.  You'll need to use Adobe Livecycle Designer to create a report template.  I ran one of my SSRS reports, rendered it to PDF, and then created a new form template based off that PDF in LC Designer.  If you've never worked with LC Designer, it's not too hard.  Since the layout of my reports are variable in length, I took advantage of the "positioned" and "flowed" subforms.  MAKE SURE THE LC FORM FIELD NAMES MATCH THE SSRS FIELD NAMES.  This is a bit of a pain, but once you have it working you'll be thankful. 
    My links are handled with buttons in LC Designer.  First, make a textbox to contain the text of the link to the target PDF from step 1 (make this in a flowed subform). Then, make a button to go directly over the textbox, remove button's caption, set button to transparent.  THIS PART WILL TAKE SOME TWEAKING depending on how your form is setup.  Add the following to the CLICK event of your button: 
    app.openDoc({cPath:xfa.resolveNode("YourReportName.ReportPage#.YourSubFormName.NumberofSub form.YourLinkText").rawValue,oDoc: this});
    If you already understand how this works feel free to read past it.  The app.openDoc needs two things from you, cPath and oDoc.  cPath is the path to the target PDF.  The xfa.resolveNode("YourReportName.ReportPage#.YourSubFormName.NumberofSubform.YourLinkText" ).rawValue says the link path is the literal value of this textbox, located in this subform, on this page of this report. 
    oDoc is where the relative part comes into play.  If you construct the [filename + .PDF] links as in step 1, and you set oDoc:this, clicking on the link will instruct Acrobat to open the target PDF using the cPath relative to your list o' links report.
    3.  Go back to SSRS, render one of your reports as XML and save it.  This is the data that you'll import into your form template.
    4.  This is where I got tripped up.  For each and every file that you want to open up from a link you will have to set its Disclosed property to True.  I accomplished this through a batch action in Acrobat.  I'm not sure what version you have, but if you're using 10 it is under File>Action Wizard>Create New Action.  These are my settings:
                    Start with: A file open in Acrobat
                    Under "More Tools", select "Execute JavaScript", click on "Options" and paste in this: this.addScript("This Doc is Disclosed", "this.disclosed = true;");
                    Save to:  Same folder selected at start So, all you have to do when preparing your target documents is run that batch action.  Add all of your target PDFs to window that pops up and click run.  AFAIK, once you've disclosed a  PDF, you won't have to re-disclose it. 
    Once you have all that setup the process to create a CD becomes fairly easy. 
    1. Render XML from SSRS
    2. Disclose all target PDFs
    3. Import XML into the template PDF you created with LC. (actual import done via Acrobat, not LC) 4. Read the new comics on XKCD while staring intently at the screen to make the boss think you are still working diligently. 
    Depending on how you want the folder structure to look like on the CD, you might have to change the way you construct your links.  I have used several methods to suit different needs, but for proof of concept, I'd probably just stick to the way I described in step 1 (resulting CD won't have a folder structure, you'll just have your "master" PDF and all of your target PDFs on the CD.  Right now I just set the target PDFs to hidden via right-click>properties before I burn them to CD.  It's lazy, but it works.) I don't know if you use an ISO program like MagicISO, or one of the others, but it will help reduce the number of ruined CDs. 
    There are many places to get tripped up and I'm sure I haven't explained the process fully, so feel free to ask if you run into problems.  Also, not trying to advertise for anyone, but pdfscripting.com was a HUGE help.  Thom Parker runs it, I believe.  They sell a subscription to their website (which I would say is worth it), but they also have a ton of useful freebies. 
    Anyway, I hope this can help.
    Chris

  • File hyperlink doesn't open link file, says 'No permission'

    Hi,
    I have created some pdf file links in Evernote and when try to open them systems says "The file __ couldnt be opened because you dont have permission". I am the only user on my mac(OS 10.8.3) with admin privilege and checked all permissions it is "Read/Write" for me. Also all those files were created by me.
    But when I open the file manually in preview and close the window (Not Preview application), and then click the hyperlink it opens it. So I am not sure what to do, apparently these file links does not work when document is not opened by preview application.
    I also have a hyperlink for a document (Pages) but that opens perfectly fine.
    I searched in community forum and someone suggested to repair file permissions using disk utility. I tried all that but no results.
    Please help and thank you .
    Shan

    Back up all data. Don't continue unless you're sure you can restore from a backup, even if you're unable to log in.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1 or if it doesn't solve the problem.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Hyperlink link action to open in browser from Syclo WM (Workorder Notes)

    Hello All , I want to make my notes as hyperlink in Agentry Syclo Workorder Level . ex1 : Notes has information : www.google.com if i press "www.google.com" then it should open in iPad safari browser as google.com Ex 2 : if Notes has information : gmail.com then when we press as hyperlink then it should open Gmail.com can you suggest ? how can i do this as hyperlink action in Syclo iPad screen ? Thanks  & Regards,   Kunal Varaiya

    Kunal,
    The HTML control is like building a website in HTML presented inside the Agentry screen.  You can use the same techniques that other people use where they use an update rule to use the @CONCATENATE rule of Agentry to add all the HTML tags to build a web page.  So for your Notes if you defined this as an HTML you will need to fully build the HTML page for it. You will need to master the Agentry @CONCATENATE rule and how you can add different properties or show different properties to ultimately build your notes field.
    In theory you can Concatenate all your properties in this one field to display on the screen.
    Here is an example of Concatenate and building an HTML functionality for the update rule against an HTML defined field. This is more complicated but if you only need to put a web page address on your typical <HTML> </HTML> then this is much simple compared to my picture below. In theory all you are doing is building the <HTML> tags and you see it in the concatenation rule below.
    Picture 1 of 2:
    In this picture above there are examples in Agentry on how your escape a squiggly line -> { as this squiggly line gets Agentry confuse or a back to back open + close { } squiggly line needs to be escape. /*{*/}. I can't remember the exact rule here but I think there is a doc somewhere on the escaping.
    Picture 2 of 2:
    Regards,
    Mark Pe
    SAP Senior Support Engineer

  • InDesign to swf--can you make hyperlinks that don't open a new window?

    I am exporting an InDesign document to swf with interactive hyperlinks placed on an existing webpage. My problem is if you click on a hyperlink a new webpage opens up. Can I make the hyperlink work so that clicking on the link does not open up a new tab or window, but changes the page within the current window?

    I have tried that too and it didn´t work out. Attribute that controls where you open your hyperlink is called Target. And InDesign doesn´t let you define it. Let´s hope some improvement with this in future...
    [Advertisement removed by moderator]

  • Unable to open .ai files from excel-word-access hyperlinks

    Hi to all.
    I'm new in the forum and  the illustrator.
    I face an issue
    I have create an excel file with a  description and a hyperlink.
    With this way the user is able to open all the  file that was able to open in only one excel.
    So far everything is OK.
    My  problem is this. Have added 3 new lines for 3 different adobe illustrator  files.
    When the user makes a click in the hyperlink open the adobe  illustrator but is empty.
    They don't opening the file that has added in the  hyperlink. (It happens only in the .ai files all the other files .pdf - .doc -  .jpg opening without any problem)
    I use windows XP with SP3 and adobe  illustrator CS4
    Thanks and regards.

    Thanks again for your time both of you
    Mylenium
    I dont think that is a excel problem we knew very well how to use excel and i dont have any problems with the other hyperlinks.
    If illustrator is open  and this try to open the hyperlink works perfect even if the illustrator is minimized!!!
    If illustrator is closed and try to open the hyperlink they open only the illustrator (empty) without any messages.
    The same behavior is when the security in excel is low.
    CarlosCanto
    In my configuration Windows XP Pro with SP3, Office 2003 Pro with SP3 and Illustrator CS4 they did not show anything.
    File or error messages!!!! (Only illustrator empty)

  • The hyperlink window won't open in 2014 version.  Anyone else having this problem?

    The hyperlink window won't open in 2014 version.  Anyone else having this problem?  I'm using HP Envy Laptop with Windows 8.1. 

    Sort of. As part of the next update we'll make Muse ignore the 125% scale setting. This will make it easier for you to use that setting with all your other applications, but even when your Display is set to scale 125% the Muse UI will be presented at 100%. Unfortunately the current transition architecture of Muse (part native 64-bit app and part Adobe AIR app internally) combined with how Windows 8 and 8.1 achieve 125% scaling means it will be quite some time before Muse will be able to correctly support 125% Display scaling. Sorry for the inconvenience.

Maybe you are looking for

  • FCP crashes in thumbnail view.

    Hi. First post here... Have serious problem with viewing clips in thumbnailview. A few is okay but when its about 40 or more fcp hangs, umbrella and crashes. Anyone with a similar problem? Kind regards Petter - Fabuloufilm

  • Why that I have a "extra" space in my menu bar? Help !!!

    Hola I have a extra space in the menu bar ONLY in explorer 8 In there, I have a navigation menu that I made in FWCS5 For the grace of God, I cannot figure it out why it looks like that... I got this errors in the Browser Compatibility Unsupported val

  • ORACLE SQL Developer: DELETE Key Stopped Working???

    OK, I'm an idiot, I admit it. I have ORACLE SQL Developer installed, and stupidly changed some of the menu items under Tools/ Preferences/ Code Editor. Now all of a sudden, my DELETE key does not delete, although BACKSPACE works fine. Also, the prehi

  • How to download firefire using internet explorer

    I am visiting my daughter and she just got a new computer. windows7 She has been using internet explorer. I have been trying to download firefox all night but it keeps saying internet explorer cannot display the webpage, only on firefox's page. ????

  • Keep getting a "Runtime Error"

    I am using PE6.0 and when I try to organize pics I receive a notice that says: "Microsoft Visual C++ runtime Library - Runtime Error".  It them closes out of the program when I hit "OK".