Results 1 to 4 of 4
  1. #1
    PhQ's Avatar
    PhQ
    PhQ is offline Senior Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    358
    Rep Power
    5

    Default Open up websites

    Is it possible to make this work:
    PHP Code:
    registerRulesLabel = new JLabel("<html>Do you agree with out <a href='http://www.google.com'>rules</a>? </html>");
    (make it so the program will open up the web browser and go to google.com)

  2. #2
    newb_tewb is offline Member
    Join Date
    Apr 2010
    Posts
    5
    Rep Power
    0

    Default hope this helps a little

    import java.net.*;
    import java.io.*;
    URL google = new URL("http://www.google.com");
    google.openStream()));

  3. #3
    PhQ's Avatar
    PhQ
    PhQ is offline Senior Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    358
    Rep Power
    5

    Default

    So how can I attach it to a jlabel?

  4. #4
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

Similar Threads

  1. Best Websites to learn Java?
    By Meta in forum New To Java
    Replies: 21
    Last Post: 03-18-2010, 09:45 AM
  2. Different Files Open in File -> Open Workspace
    By mgm2010 in forum JCreator
    Replies: 0
    Last Post: 04-11-2009, 02:14 PM
  3. how to open a file through URL
    By katie in forum New To Java
    Replies: 3
    Last Post: 07-13-2008, 02:53 AM
  4. Open Blue Lab 1.3.2
    By levent in forum Java Software
    Replies: 0
    Last Post: 08-01-2007, 04:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •