How do I make a button take me to a web site?

I have an applet, and I want to make it so that when I press a button it takes me to another URL. Please give me the code.

appletContext.showDocument(url);
public class WindowUrl extends Applet implements ActionListener{
public void init(){
Button button=new Button("Url Window");
button.addActionListener(this);
add(button);
public void actionPerformed(ActionEvent event){
AppletContext appletContext=this.appletContext;
url=new URL(urlString);
appletContext.showDocument(url);
}

Similar Messages

  • How do I make a button NOT take focus when it is clicked?

    I am trying to create a virtual keypad and the problem is that when I have a Robot make a KeyEvent for a certain number when a certain button is pressed, the TextField loses focus and the focus is placed on the button that was pressed, so nothing appears in the TextField.
    How can I make a button NOT take the focus when it is pressed?
    Edited by: tox0tes on Nov 28, 2008 8:06 PM

    great. another way is to have a call to myTextField.requestfocus() in the button's actionlistener actionPerformed method, but that leads to tight coupling.

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • How do I make a button onj the form which will submit and send the pdf as an email?

    how do I make a button on the form which will submit and send the pdf as an email?

    You can set up a button with a "Submit a form" action and use a mailto type URL to specify the email address you want the forms sent do. If you want to send the entire PDF, select that option and not FDF or anything else. The mailto URL should not include any spaces and the "mailto" part should be lowercase, like:
    mailto:[email protected]
    This will attempt to initiate an email using the users default email client. If the user does not have one set up or there is some other problem, the email might not get initiated. If it needs to work with Reader versions prior to 11, then the form needs to be Reader-enabled, which you do in Acrobat 11 by selecting: File > Save As Other > Reader Extended PDF > Enable More Tools

  • How can I make a button that on press the object appears and on second press the object to disappear

    Hello,
    I'm quite new to flash programing, and I don't know how can I make a button that will make the object appear and disappear.Till now I have this code for the appear:
    on (press)
        _root.top1.gotoAndStop(2);
        _root.topp.gotoAndStop(2);
        _root.mm1.gotoAndStop(2);
              _root.m1.gotoAndStop(2);
    but from here I'm stuck.
    Thank you for your help

    What you can do is use the _visible property of the object to make it appear and disappear, or more correctly, use the opoosite of the _visible property.  You should not put code "on" objects, keep it in the timeline.
    If "object" is the instance name of the object you want to toggle, then in the timeline code you can use...
    object._visible = false;  // start with the object being invisible
    yourButtonName.onRelease = function(){
        object._visible = !object._visible;
    That one line in the function sets the object's _visible property to be the opposite of what it currently is.

  • How can I make my buttons be gone forever?

    Just starting out with Flash and have run into a problem. I have several scenes with buttons that can be pressed once and then they disappear using:
    myBtn1.onRelease = function(){ this._visible=false}
    But when I go back to the scene the buttons reappear. How can I make my buttons be gone forever?

    if you have more than 1 button that should be made not visible at any given time, you'll need to use an array to store those button references.  otherwise, you can use:
    var alreadyRemoved:Boolean;
    if(alreadyRemoved){
    myBtn1._visible=false;
    myBtn1.onRelease=function(){
    this._visible=false;
    alreadyRemoved=true;

  • How can I make a button "react"?

    This is probably a super silly question, but you know how it is, sometimes we sit on the answer and still can't find it... How can I make a button react to a click? I just want the simple effect of the button changing colors or looking like the user pushed it. Right now it's just the same old plain button, no matter if I click it or not, you can't really tell the difference. How can I give it the "pushing the button" effect? Thanks guys!

    You can choose image button and then choose from the available image buttons, or click on the folder icon when you select the image button and choose from the Gallery of Captivate 6.
    Few image buttons change color on hover or onclicked, these effects are predefined in them.
    Or you can edit that button on which you are working, from properties Panel.
    The Post and Cancel button on this thread seems like a transparent button in Captivate with different fill and stroke color, and transparency is also less, and with corner radius of 0.
    You will find these all optionns, when you will click on that button and then click on the properties panel.
    Thanks.

  • How can I make a pull down menu in I web

    how can I make a pull down menu in I web?

    You can't do this directly in iWeb itself and it is quite complex - you need to use third party software and it is a matter of pasting code into the html snippet in iWeb and then uploading certain things to your host/server and then connecting them.  It can get quite fiddly if you don't really know what you are doing and it only takes you to upload the wrong thing and get some code wrong and your menu will not show up.
    Why not ditch iWeb in favour of newer software - try EverWeb at http://www.everwebapp.com and in EverWeb you can create drop down menus from within the app and it is very easy to do.
    I would change now as iWeb has not been supported by Apple or sold for the last 2 years, so now might be a good time to look elsewhere and ditch iWeb for good.
    I already have and purchased EverWeb and re-built one of my sites using this app and have moved my other site to Drupal so that I can do more with it and make it a members site - this can be done more easily if you use a Content Management System like Drupal.

  • Is it possible to have a link/button inserted into the end of my flash video that makes up the first page of my web site

    i am not sure if this will make sense so please tell me if it
    doesn't. is it possible to have a link/button inserted into the end
    of my flash video that makes up the first page of my web site. the
    video plays showing the name of the site then fades to show the
    text "enter" which i want to make the link to the next page.

    > the video plays showing the name of the
    > site then fades to show the text "enter"
    in FLASH set a gotourl action on the last frame of the move.
    If this is a "splash page" and has a dancing company logo and
    a throbbing
    drumbeat- reconsider. Just make the homepage of the website
    the homepage.
    Don't make people wait to see some content.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • How can I change one color in design on a web site for exemple background : white to light-brown?

    1. how can I change one color in design on a web site for exemple background : white to light-brown?
    2. how can I edit visual bookmark on the beginning page?

    This doesn't sound like a Firefox issue. I think you'd be better off with a site that offers web design tutorials. Try this one: http://www.w3schools.com/
    One thing you should do though and that is to update Firefox via Help | Check For Updates.
    There was a security breach at Comodo which is an SSL certificate provider recently whereby a number of fraudulent certificates were inadvertently issued. These allow a hacker to impersonate any site including online banking and the Firefox version you're running at the moment will not warn you that the site is a fake. The fraudulent certificates were blacklisted in v3.6.17 and beyond.
    See also: http://blogs.comodo.com/it-security/data-security/the-recent-ra-compromise/

  • How do I copy & paste from an email to another web site?

    How do I copy & paste from an email to another web site?

    Hello, not quite sure what it is you want to do.
    In Mail you can copy something by highlighting it & CMD+c, or Mail>Edit>Copy, but whether you can paste it to a website, not sure, but you could say paste in in a Reply here...
    Re: Grey Screen with spinning gear
    reply from duwatucan in Mac mini - View the full discussion
    Congratulations, your post has solved duwatucan's question.
    Learn more about the Apple Support Communities Reputation System
    Did this help? Go to the message, sign in, and reply
    Start a new discussion in the same community

  • Trying to make a back ground transparent for a web site

    Trying to make a back ground transparent for a web site on a logo image

    There is no picture? Did you try sending it by email? You'll have to sign into the forum and use the camera icon to upload. Thank you.
    Benjamin

  • How in dw cs6 i can design/develop a multilanguage web-site, eg 3 languages european... what code pa

    how in dw cs6 i can design/develop a multilanguage web-site, eg 3 languages european... what code pattern to use? required server side language or plain html5/css3/js/jQyery web-pages can be done?

    Multi-langauge sites are best served with a content management system ( cms ) with custom text written for each language.  A CMS will most likely be written in a dynamic language (PHP/ASP) and use a database.

  • How do I make multiple buttons in my flash animation?

    I am new to flash, and I have no training in it whatsoever. I
    created a flash animation with flash CS3 for my photography
    website, and I want to link each of the images to different
    galleries on my site. When I created my first button it worked
    fine, but when I try to create actions to link more than one image
    as a button, keep getting an error that says "1021: Duplicate
    function definition." How do I make each image as a separate
    button?
    I used the video of this tutorial as my guide to learn how to
    create a button:
    http://www.adobe.com/designcenter/flash/articles/flacs3it_firstflash_pt1.html
    Also, when I run the animation to test it, it loops, and I
    don't want it to loop. How do I stop it from looping?

    I used the method shown in the tutorial I mentioned to create
    it (created a new layer for the button, selected the area of the
    image for the button,used modify -> convert to symbol
    -> button, I edited it so it was an invisible button by
    moving it to the hit frame, gave the selected area an instance name
    of Hizumi_btn, inserted a new layer for actions and added the code
    I have attached to this post.
    I assumed that I would just need to repeat this procedure for
    each of the other images in my animation, but when I did that I
    received the error.
    I greatly appreciate any help you can give me.
    Thanks for the information on how to stop the animation.
    Here is the code I used to create my first button.

  • How can i make save button of a pop up window inactive?

    Hi...
    When we open a document attached to an opportunity,
    a pop up opens up in new window with open,save and cancel buttons.
    The document is opened by creating a url....
    How can i make the save button inactive?
    Any helpful pointers would be rewarded...
    Thanks...

    Hi..
    This thread remains closed...

Maybe you are looking for

  • How to upgrade Php Version in solaris 10 SPARC ?

    How to upgrade php  Version 5.4.7 to latest version 5.5.3? Do we need to uninstall current version(5.4.7) and install latest version(5.5.3)? Or is there any way to upgrade directly.

  • Text upload in Web Template variable selection screen

    Hi all, In the Analyzer it is possible to upload text files in the variable selection screen but I can't find this feature in the variable selection screen for Web Templates. Anyone has an idea ? Regards, Olivier

  • OID audit question

    Hello, people! I have question about auditing in Oracle Internet Directory. 1. I turn audit on in my OID. 2. Restart OID. 3. Searching for Audit Log Entries by Using ldapsearch. The DN for the audit log container is cn=auditlog. To search for audit l

  • ID already in use

    When I try to sign into FaceTime i get the message "Unable to verify "[email protected]" because it is already in use by another Apple ID".  What does this mean & how do I rectify it?

  • None of the songs will play in my library

    none of the songs will play in my library, even with my ipod plugged in, an error message reads that the original file cannot be found, and then asks me if i want to locate it .... not sure what to do?