How do I make a Hyperlink in Java?

Hi!
I've made an Image Icon out of a JButton in an applet. When the button is pushed I want to link to a popup html-window. Could you please write some code down to me. Appreciated. Thx.

Here is hyper link button and hyper link label as well.
http://forum.java.sun.com/thread.jsp?forum=57&thread=328882
It will work as I tested.
GOod luck

Similar Messages

  • How can i make my hyperlinks open in a new window or tab?

    how can i make my hyperlinks open in a new window or tab?

    The program is InDesign… we need to cease links which will open the linked document in a separate window.  Also, the links must be maintained once a pdf is made and the files moved to another computer….

  • How can I make outside hyperlinks work in Muse?

    Hi, I am a very frustrated newbie in Muse, struggling to make my first website work. I created the website for a chamber of commerce, so I am trying to create a table of members with links to their business websites. I could not import a Word document table so did a table by hand in Muse. I also created hyperlinks using the copy and paste method, and the hyperlink tool at the top - it worked fine but was taking too long to try and hand do a table format. So after researching the Internet, determined that importing the Word table into InDesign and converting it to a PNG would work. So I successfully accomplished that, but the links do not work in the preview nor the published version, and the document was not editable. Once again I was stuck. I then tried to copy and paste from the InDesign document using text boxes, but that hasn't worked either. Can somebody please help?

    I doubt MU can do this.  It's pretty limited in scope &  I don't think it supports server-side code which you would need to parse feeds.  But feel free to post your question in the MU forum.  Maybe somebody there has a workaround.
    http://forums.adobe.com/community/muse/help_with_using_adobe_muse
    Nancy O.

  • How do I make a "hyperlink" in a JFrame?

    I have a JFrame with JLabels and JButtons.
    If you click on a JButton (or a JLabel) I would like to open a new window (or IE) with a certain website.
    How shall I write?

    This example uses a button:
    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.io.IOException;
    public class MainFrame extends JFrame implements ActionListener {
    private JButton button1;
    private String url;
    public MainFrame(String url) {
    super("Test");
    this.url = url;
    setBounds(50,50,50,50);
    button1 = new JButton("Click Here");
    button1.addActionListener(this);
    getContentPane().add(button1);
    setVisible(true);
    public void actionPerformed(ActionEvent e) {
    try {
    JFrame jf = new JFrame("Another Test");
    jf.setBounds(0,0,800,600);
    JEditorPane jep = new JEditorPane(url);
    jep.setEditable(false);
    jf.getContentPane().add(jep);
    jf.setVisible(true);
    catch (IOException ex) {
    System.out.println(ex);
    public static void main(String[] args) {
    MainFrame mf = new MainFrame(args[0]);
    Just call like this: java MainFrame http://java.sun.com (or any address, but you must include the protocol)
    If you connect to the internet through a proxy, this will throw an exception, so you'll need to set your system properties with the proxy server address.
    Hope this helps

  • How do I make the hyperlink underlined when I scroll over it?

    Hello!
    I'm having trouble with my hyperlinks changing color when I scroll over them so I decided to underline them instead. Can anyone tell me how to do that?
    Thanks!

    Never mind, I figured it out. It's the underlined "U" next to the color in the inspector, duh!

  • How can I make Timeout in portal (Java).

    I've made a change to the SAP logon, allowing a change of password. I need to find a way to keep the program from re-directing the user to the logon page immediately after changing the password, as it will not have registered yet. Does someone know how to make a time-out in SAP Portal?

    This should do it.
    Note that there is nothing preventing the user from closing the window before or ignoring it totally and enter username and password. You could also disable the login form using javascript for a period of time.
    <SCRIPT language="JavaScript">
    function showPleaseWaitWindow() {
         waitWindow= window.open('http://google.com','waitwindow','height=255,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
         //close after 5 seconds
         setTimeout("waitWindow.close()",5000);
    showPleaseWaitWindow();
    </SCRIPT>
    Dagfinn

  • How do I make a Hyperlink open in a different window?

    Hello,
    When people click my Hyperlinks they leave my website. Is there a way for the hyperlinks to open in a new window so that my website always stays open on the desktop?
    I hope that is clear?

    I don't recall the previous versions to 08, but in 08 in the inspector when you enable a hyperlink to an external page there is an option to have the link open in a new window.

  • How do I make a hyperlink with dynamic data from a php data base table?

    Level - Dreamweaver infrequent user
    I have a standard master-detail couple of pages using MySQL and PHP. This function is working correctly. One of the data items on the Details page contains the name of a PDF document (including the .pdf suffix). The PDFs are stored in the PDFs library under the Site Root. I am wanting the ability of the page user to look at the associated PDF. Keeping it as simple as possible I just set up a text field 'View Report' followed by the Dynamic Text for the document name. I tried defining the Link Properties with the PDFs library name (plus the root level) followed by the code I thought it needed to identify the selected PDF document ( <? php echo $row_rslivesDetail['ReportLink']; ?> ). The first part is correct because when the code failed I changed it to a fixed PDF document and that worked. I've tried various combinations but not been successful. Can someone please suggest what I'm doing wrong with the code.
    Regards
    Cliff

    Do the PDFs actually reside in your MySql database or are they just in a folder on your server?
    To parse files from a folder, you could use something like this:
    <h2>PDF Files</h2>
    <?php
    class SortingIterator implements IteratorAggregate
    private $iterator = null;
    public function __construct(Traversable $iterator, $callback)
    if (!is_callable($callback)) {
    throw new InvalidArgumentException('Given callback is not callable!');
    $array = iterator_to_array($iterator);
    usort($array, $callback);
    $this->iterator = new ArrayIterator($array);
    public function getIterator()
    return $this->iterator;
    ?>
    <!--results-->
    <h3>2014</h3>
    <?php
    function mysort($a, $b)
    return $a->getPathname() > $b->getPathname();
    $item = new SortingIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator('pdfs/2014/')), 'mysort');
    foreach ($item as $file) {
    echo '<li><a href="' . $file . '">' . $file->getFilename() . '</a> - '. round( $file->getSize() / 1052) . '  KB </li>';
    ?>
    </ul>
    In my example above, pdfs is my main folder and 2014 is my sub-folder. 
    Results echo inside a list with each file name hyperlinked.  See screenshot.
    Nancy O.

  • How do I make hyperlinks open in new window?

    Hi, I'm using Acrobat X Pro.  I have a pdf uploaded to a website, and within that pdf are two hyperlinks to other websites.  Currently, if I click on the links, they open in the same window.  How do I make the hyperlinks open in a new window by default? In Acrobat X Pro, I tried editing the hyperlinks by right-clicking them and selecting properties, but I don't see an option to specify how the link should open.  Is this option available for web links?

    I think the best you can do is use the app.launchURL JavaScript method and specify that you want to open in a new window:
    // Script for link action
    app.launchURL({cURL: "http://www.example.com", bNewFrame: true});
    For this method's documentation, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.150.html

  • How does Sun make money from Java? Silly question.

    Hi,
    From what I have read about the J2SE licensing, we are able to download the SDK and develope commercial applications with it for free.
    Have I made a big mistake in my reading? How does Sun make any money from Java?
    Thanks very much.
    Prem.

    related topic
    a lot of companies package a free or trial version of software like
    Rational Rose
    TextPad
    VisualAgeForJava
    DreamWeaver
    etc.....
    the versions may be limited in many ways
    they want public and students to use it to become popular
    students get jobs and convince boss to buy enterprise edition
    they make money
    I didn't mention sun in the above list cause they are special!!!!!
    some other interesting topics include GNU liscence and
    COPYLEFT
    check it out

  • How to make a table in java without using GUI??

    how can i make a table in java without usinf GUI, just simple codes??
    NAME ID NUMBER ADDRESS STATUS

    If you simply want to store them internally, you don't want to use a table.
    Make a simple class with properties id, name, number, address, status. Then create a Hashtable that indexes instances of the class by id or some other property.

  • How to make Connection Pooling in JAVA

    Dear Members
    I want to know that how can i make connection pooling in java and also how can i use that pool in my jsp/servlet application.
    Plz Describe in Detail.
    Thanks
    Vasim

    vasim_saiyad2000 wrote:
    Dear Members
    I want to know that how can i make connection pooling in java and also how can i use that pool in my jsp/servlet application.
    Plz Describe in Detail.
    Thanks
    VasimAs the previous poster is trying to suggest, the server you use will have datasource and connection pooling support. so look up in the manual how to set it up, or do a google search. For example if you use Tomcat, look here:
    http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

  • How can I make hyperlinks work from a Flash/SWF presentation?

    How do you make hyperlinks/buttons work in Flash/SWF Captivate 5.5 presentations? This did not seem to be an issue with Version 4. I cannot publish to video (i.e. mp4) or as an executable file for posting on our internal system. If it cannot be done in Flash/SWF, how else can I get buttons/hyperlinks to work? Thank you.

    Welcome to our community
    Please take a look at the links below. Not only do they answer your question, they are there to help you get the best forum experience.
    Forum Participation Suggestions
    Frequently Encountered issues
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • How can i make hyperlink to local file for dowloading

    How can I make hyperlink to a local file for downloading it, it seams that only www links work in web Ui.
    Thanks

    If we assume that you have a LabVIEW application running on your cRIO that is exposing some data through web services, there are a couple of possibilities.
    You can create a web service call that returns the log data. In order for the browser to treat this as a file, you must set the correct content type in the http header. To do this you can't use the default form of data output. Instead you must create an "httpRequestID" input to your web service VI. With this you can call "Write Response.vi" to give the log data and "Set HTTP Header.vi" to specify the type (text/text probably works for a log). You can look at "examples\comm\webservices\address book\FindContacts.vi" to see an example of calling these 2 VIs. Once you create that web service entry point, you can set that as the URL of the hyperlink control and it should work.
    Another option is to have the cRIO application write to a log file that is under the root of the web server running on the machine. (This is the same place the xap for your Web UI Builder application is put.) This file could then be served up through the web server just like any other file.
    With either of these solutions there may be concerns about the browser caching results rather than requesting new content each time. There are additional values that can be set in the http headers with the first solution that can help with this, but I think there is still some variation between browsers.

  • Java class uses another class in a Jar file (How do I make Java see it)?

    I am trying to figure out how do I make Javac see the thinlet.class in the thinlet.jar.
    I have developed an XUL xml interface and a java program that calls the interface shown below:
    //package thinlet.demo;
    import thinlet.*;
    public class UI extends Thinlet
    { public UI () throws Exception {add(parse("UI.xml"));}
    public static void main(String[] args) throws Exception
    { new FrameLauncher("UI", new UI(), 600, 600); }}
    when I do the normal compile, I get an error:
    UI.java:4: cannot find symbol
    symbol: class Thinlet
    public class UI extends Thinlet {
    ^
    UI.java:7: cannot find symbol
    symbol : method parse(java.lang.String)
    location: class thinlet.demo.UI
    add(parse("UI.xml"));
    ^
    UI.java:12: cannot find symbol
    symbol : class FrameLauncher
    location: class thinlet.demo.UI
    new FrameLauncher("UI", new UI(), 600, 600);
    ^
    3 errors
    This thinlet class should be in the thinlet.jar that I have added the directory to the path, the directory and jarfile name to the System CLASSPATH and it couldn't see it. So finally I tried putting the thinlet.jar in the same directory to no avail. I've searched the web for some time an cannot find anything that specifically speaks to compiling a program that has parent classes in a Jar.
    Any help is definitely appreciated.

    This thinlet class should be in the thinlet.jar that I have added the directory to the path, the directory and jarfile name to the System CLASSPATH and it couldn't see it. So finally I tried putting the thinlet.jar in the same directory to no avail. I've searched the web for some time an cannot find anything that specifically speaks to compiling a program that has parent classes in a Jar.
    Any help is definitely appreciated.You just still haven't provided the jar in the classpath, or you're not using the right class name. Is the class really named thinlet.Thinlet? Or are you thinking "import thinlet.*" means to import all classes in a jar named thinlet.jar? Because the latter is not true. You need to import classes, not jar file names.

Maybe you are looking for