One button to launch another

i have several buttons on one stage that are supposed to do
the same thing. they're all very code intensive so i'd just like to
code one and have the rest simply act as though selecting them
selects the button with all the script. I'd think this would be
simple but I haven't tracked down the solution yet. thoughts
anyone??
thanks

show the code for two of your buttons.

Similar Messages

  • Button to launch another java file????

    Hi there,
    Was wondering if someone could help with the following:
    I have a button, which once clicked opens another java file, and am aving some difficulty in doing this.
    The file which has the button is:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.util.*;
    class JFrameHolidayPlannerGUI extends JFrame
         //declare the variable using in here
         private JButton exit;
         private JButton clear;
         private JTextField t;
         private JLabel employeeId;
         private JTextField t2;
         private JLabel days;
         private JButton find;
         private JMenuItem close;
         private JMenu file;
         private JMenuBar menubar;
         private JButton add;
         private JPanel panel1;
              public JFrameHolidayPlannerGUI()
              //Set the title of the frame
              super("Company Holiday Tracking System");
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Container contentPane = this.getContentPane();
              //Created a pane with four panels and null columns
              contentPane.setLayout(new GridLayout(4,0));
              JMenuBar menubar = new JMenuBar();
              setJMenuBar(menubar);
              JMenu file = new JMenu("file");
              JMenuItem open = new JMenuItem ("Open...");
              JMenuItem save = new JMenuItem("Save");
              JMenuItem close = new JMenuItem ("Close");
              JMenuItem print = new JMenuItem ("Print...");
              menubar.add(file);
              file.add(open);
              file.add(print);
              file.add(close);
              file.add(save);
              close.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent e)// Define the action to take after user enters the name
                             //if (e.getSource() == exit)
                             System.exit(0);
              JPanel panel = new JPanel();
              panel.setLayout(new FlowLayout(FlowLayout.LEFT));
              contentPane.add(panel);
              JLabel employeeId = new JLabel("Please Enter the employeeId", JLabel.CENTER);
              final JTextField t = new JTextField(15);
              t.setToolTipText("Please Enter the employeeId");
              t.setEditable(true);
              t.setText("Enter employeeId in here");
              JButton find = new JButton("Search for a Record");
              find.setToolTipText("Click to search for an employee record");
              find.addActionListener(
                   new ActionListener()
                        public void actionPerformed (ActionEvent e)
                             System.out.println("time");
              panel.add(employeeId);
              panel.add(t);
              panel.add(find);
              contentPane.add(panel);
              JPanel p2 = new JPanel();
              p2.setLayout(new FlowLayout(FlowLayout.LEFT));
              contentPane.add(p2);
              days = new JLabel("How many days would you like?", JLabel.LEFT);
              final JTextField t2 = new JTextField(15);
              t2.setToolTipText("How manys days would you like?");
              t2.setEditable(true);
              t2.setText("Enter the numbers of days in here");
              JButton submit = new JButton ("SUBMIT");
              find.setToolTipText("Press enter to submit holiday request");
              submit.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent e)
                             JFrame = new JFrame();
                             frame.addWindowListener(new WindowAdapter() {
                                       public void windowClosing(WindowEvent e) {
                                            System.open();
              p2.add(days);
              p2.add(t2);
              p2.add(submit);
              contentPane.add(p2);
              JPanel panel1 = new JPanel();
              panel1.setLayout(new FlowLayout(FlowLayout.LEFT));
              contentPane.add(panel1);
              JButton save1 = new JButton("Save");
              save1.setToolTipText("Click to save");
              panel1.add(save1);
              exit = new JButton("Exit");
              exit.setToolTipText("Click to exit");
              panel1.add(exit);
              exit.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent e)// Define the action to take after user enters the name
                             //if (e.getSource() == exit)
                             System.exit(0);
              JButton clear = new JButton("Clear");
              clear.setToolTipText("Click to clear the information");
              panel1.add(clear);
              clear.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent e)// Define the action to take after user enters the name
                             t2.setText(" ");
                             t.setText(" ");
              add = new JButton("Add");
              add.setToolTipText("Click to add an employee");
              panel1.add(add);
              this.pack();
              this.setVisible(true);
         public static void main(String[] arg)
              JFrameHolidayPlannerGUI jf = new JFrameHolidayPlannerGUI();
    and the file that needs to be opened is:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.util.*;
    class JFrameSubmitValidate extends JFrame
         private static String label = "Are you sure you want to Submit?";
              public JFrameSubmitValidate()
                   //Set the title of the frame
                   super("Vaidator");
                   this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   Container contentPane = this.getContentPane();
                   //Created a pane with four panels and null columns
                   contentPane.setLayout(new GridLayout(2,0));
                   JLabel validate = new JLabel(label);
                   JButton OK = new JButton("OK");
                   JPanel panel = new JPanel();
                   contentPane.add(validate);
                   contentPane.add(OK);
                   this.pack();
                   this.setVisible(true);
              public static void main(String[] arg)
                   JFrameSubmitValidate sv = new JFrameSubmitValidate();
    thanx for your time.
    kev.

    Similarly to this above discussion, I would like to know how to launch another java file by clicking a button "submit". Can you guys guide me based on the code i have shown below..?
    import java.awt.*;
    import java.awt.event.*;
    class MenuFrame extends Frame implements ActionListener
    Label login=new Label("Login ID :",Label.CENTER);
    TextField lname=new TextField(12);
    Label pass=new Label("Password :",Label.CENTER);
    TextField lpass=new TextField(10);
    Button submit=new Button("Submit");
    public MenuFrame(String title)
    super(title);
    setLayout(new FlowLayout());
    add(login);
    add(lname);
    add(pass);
    add(lpass);
    add(submit);
    submit.addActionListener(this);
    addWindowListener(new CloseWindow());
    public void actionPerformed(ActionEvent e)
    Object source=e.getSource();
    if(source == submit)
    lname.setText("w");
    lpass.setText("w");
    repaint();
    public static void main(String args[])
    MenuFrame m=new MenuFrame("Java Chat Application");
    m.setSize(200,200);
    m.show();
    class CloseWindow extends WindowAdapter{
    public void windowClosing(WindowEvent event){
    System.exit(0);

  • Button to launch another application

    what is js for launching another applicatoin?

    I found this:
    To add  script to open a user-specified PDF file
    Add the following script to the Open  button:
    app.openDoc(FilePath.rawValue);
    In the help section under "Opening an application from a form". This
    wouldn't seem to fit what you want for 2 reasons.
    1. The example requires the user to input the path of the file into
    a text field
    2. It doesn't work. I get a js error saying that security settings
    prevent access to that method
    If you can get around the security settings and the path to the
    application is a known quantity for your prospective users, I would
    think you could hard code in the path on the click event. The problem
    is getting around the security settings.
    addendum:
    I'm able to get another Adobe pdf to open with this script but so far
    nothing else.

  • How can i generate ActionEvent to one button by preesing another?

    i use awt GUI , i need to prees one specific buttonand as a result generate event to onather button , (like i was preesing it) , please help me!
    [email protected]

    this is just a test for understanding feature

  • How to use one button to drive another button click

    I'm trying to figure out a way to fix a bug in my application.  The simple fix would be to have a single button that drives a MouseCLICK event on another button everytime the PlayBar in my application reaches the end of the screen and returns to its origin.
    How would I achieve this?  I have made a lot of headway since I last posted a question in the ActionScript 3 forum, which was only yesterday evening.
    Thanks in advance,
    markerline

    The application is an audio application.  It is like a drum machine sort of.
    Currently there is a grid and whenever active cells get hitTest'ed by the PlayBar they become deactivated, the PlayBar returns to the origin, and when you relaunch the Play functionality the deactivated cells no longer play a sound.
    I have a button which reactivates the sounds.
    I also have a button which has a bug in it that loops the sounds. 
    To go around the looper button that has a bug in it I would like to use a Button "Z" which automatically clicks the "reactivate the sounds" button every time the PlayBar returns to the origin and the PlayBar will then continue to play and return to the origin in a looping fashion.  If the Button Z is in an active state this looping will continue.  To stop looping, click the Button Z until it is no longer in an active state and the PlayBar will then remain at the origin.

  • Paypal button code works fine for one button but not another

    Hey there, I have a paypal btn with this code on it:
    on(release){
    mylv = new LoadVars();
    mylv.cmd = '_s-xclick';
    mylv.encrypted = '-----BEGIN
    PKCS7-----MIIH0QYJKoZIhvcNAQcEoIIHwjCCB74CAQExggEwMIIBLAIBAD
    CBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYD
    VQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW
    5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2 ==-----END
    PKCS7-----';
    mylv.send('https://www.paypal.com/cgi-bin/webscr', 'POST');
    (i took a few characters out of the encrypted string--just in
    case and to shorten the post)
    This button works fine.
    Now, I need a second button for a different item.
    So, I went on to paypal last night and generated a "buy now
    button" several different times. Copied and pasted the encrypted
    string where the old one is. When I have the site live and click on
    the new button it takes me to a paypal pages that says "We were
    unable to decrypt the certificate id."
    Any one have this issue before? And does anyone have any idea
    of how to correct it?
    Thank you in advanced,
    hutch

    HI Bob,
    You can test your settings by clicking the big "Test My DNS" button at <https://www.dns-oarc.net/oarc/services/dnsentropy>. If you see "Poor" on any of the tests, don't use that domain name server! Remove it from Apple Menu => System Preferences =>Network =>DNS Servers or similar location in your router if you've got a 'home network'. If all you have is "poor" DNS servers in your list, call your ISP and insist that they give you the address of a name server which is protected against the recently exposed DNS cache-poisoning threat.
    Also, open System Preferences/Network. Click the DNS tab. Add these numbers in the DNS Servers box.
    208.67.222.222
    208.67.220.220
    See if that helps.
    Carolyn

  • I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button

    I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button to navigate back to my starting point the bookmarks are replaced by "page thumbnails". Is there anyway to stop this from happening?

    Hi Pusman,
    While setting up the links, if you choose to open the file in a new window then you won't face this issue, then you can simply switch to the previous file and bookmark view will remain as it is.
    Does that helps with your query?
    Regards,
    Rahul

  • Launch one CS app from another

    Hi all,
    Newbie alert - sorry!
    I am currently stuck on something that seems simple, but I cannot get it to work - it's about coordinating between multiple CS apps.
    I want to cause one Creative Suite app (e.g. Photoshop) open a certain document (say a JPEG file) while running a CS Extension running in another Creative Suite app (e.g. Illustrator).
    I first naively assumed I could just use the app property of the Photoshop class (i.e. 'com.adobe.csawlib.photoshop.Photoshop.app') from an extension hosted by Illustrator, but I am not having much luck. One possible cause is that Photoshop is not necessarily running. When I try to refer to Photoshop.app while 'inside' an Illustrator extension, I do get an object back, but it's full of nulls and empty member variables - it's not properly instantiated, and as soon as I try to refer to something 'in' it (e.g. Photoshop.app.open(...)), a null exception is being thrown.
    I've tried pre-launching Photoshop manually, but that does not seem to help, and any which way, I want to automatically launch Photoshop if it has not been launched yet.
    The next thing I tried was to use an embedded ExtendScript - when one is using ExtendScript, it's fairly simple to talk to other apps in the Creative Suite. There are objects called 'photoshop', 'illustrator' and so on, and there is BridgeTalk.
    But when I call my ExtendScript from within ActionScript using the HostObject, it looks like I am missing all of the normal 'infrastructure' I've grown to expect when running ExtendScript. I suspect it's because I am in a separate engine that does not have the stuff I want to access.
    Then I tried to force things - I noticed the sample code that runs an ExtendScript in ActionScript has a phrase:
    var myBridgeScript : HostObject = HostObject.getRoot(HostObject.extensions[0]);
    and HostObject.extensions[0] is something like 'com.adobe.illustrator'. So I tried other strings here (e.g. running inside Illustrator, I tried 'com.adobe.photoshop') - no luck. Got a null in myBridgeScript.
    I looked at the CSXSEvents - but as far as I understand those would only help me when Photoshop is already running - Bob Stucky's cookbook article
    http://cookbooks.adobe.com/post_Inter_Application_Communication_with_the_Creative-18456.ht ml
    ends with: 'Possible extensions would be to launch Photoshop, if necessary, using Air's NativeProcess'. That sounds like bad news, and seems to indicate I'd have to go search for the Photoshop app path the hard way (keeping in mind that some people install their Creative Suite in odd places, so it's not always in '/Applications/Adobe Photoshop CSsomething' or 'C:\Program Files\Adobe\Adobe Photoshop CSsomething').
    Now, I can go do this the complicated way (calling down to the underlying operating system, try to find the correct Photoshop app (there might be more than one), and launch the document through the OS) - but I was really expecting there would be a simple magical trick to do it in a much more direct manner - it's clear the Creative Suite apps know about each other, so I was hoping to find a way to rely on their internal smarts to launch documents from one CS app into another CS app.
    Any ideas?

    Any ideas?
    Hi Kris!
    Yeah. Wait for Vulcan in CS Next... (sorry I couldn't resist...)
    I first naively assumed I could just use the app property of the Photoshop class (i.e. 'com.adobe.csawlib.photoshop.Photoshop.app') from an extension hosted by Illustrator, but I am not having much luck...
    I'd expect that. The CSAW libs are basically all smoke and mirrors. If you can't do it using ExtendScript, you can't do it in ActionScript. One app does not know another app's DOM...
    The way I'd handle it would probably be using Bridgetalk on the ExtendScript side of things with a (double) callback going back to the ActionScript side of things once the Bridgetalk returns its results to the ExtendScript layer.
    We should probably get together to solve this problem for the long-term...
    Harbs

  • I got a new computer and all applications were transferred to the new one. When I launch Acrobat 8 Professional, I get a warning that Acrobat cannot be launched now and that I need to launch another application e.g. Photoshop which is already launched. An

    I got a new computer and all applications were transferred from the old one. However, when I tried launching Acrobat 8 Professional, I get a message that says: "Adobe Acrobat 8 Professional cannot be opened at this time and I need to launch another application in the suite e.g.Photoshop" which is already launched. Is there some help around this?

    It appears that you have the CS. What new OS do you have. If it is Win 8.1, you may have to purchase a new version of Acrobat for that system. Folks have succeeded with AA 8.1 on Win 7, but I have not heard of any successful installs on Win 8.1. As for the issue you have with the new OS, you do have to follow the CS install process that is different than the stand-alone Acrobat (there are some posts that discuss the process if you search).

  • Launching another Swing application from existing one using Runtime.exec()

    Hi,
    I have two separate Swing applications, say A and B. I need to launch B from A using Runtime.exec() - essentially I am launching another VM instance from one VM. I am encountering strange problems - B's main window comes up, but GUI doesn't update; sometimes B comes up and GUI updates, but huge memory leaks happen. All the problems with B go away once A is shut down. It almost looks like both the instances of VM are sharing (or competing for) the event thread. Any comments will be of great help. Thanks.
    note: There is no problem launching B if A is a console java application (i.e. no Swing GUI).

    Do you have to have the second application running in a seperate VM (process)? If not completely neccesary, then you can just invoke the static main() of the second class. If the type of the second class isn't known untill run-time, you can use Reflection to invoke the method.
    Miguel

  • Can an Advanced Action Launch another Advanced Action (or more than one)?

    Hi Everyone,
    I was wondering if an Advanced action could launch another Advanced Action?  I have a custom quiz results page and I want several different Advanced Actions to run when the learner enters the page.  Is this possible?
    paul...

    Of course Rick, but that is not really calling another action from an action, since you need to use another event.
    As Rod points out, preparing carefully advanced actions by choosing the right events, variables (reusing them) and the proper sequence for statements and decisions in advanced actions can solve a lot of situations. I have been trying to explain that in several blog posts. That was also the reason why I asked about more details concerning the user's situation. It is about an On Enter action. Until now I rarely had to use a workaround by navigating to a dummy slide to execute an advanced action over there using its slide events. All depends on planning and preparing.
    Lieve

  • Help please:  Clicking an image to launch another web page?

    I have some images on a JSC created page. I'd like to give the user the ability to click on the images and have another web page brought up that shows a larger version of the image they clicked on.
    How can this be done?
    I know how to do it using a button that would sit under each image that would then launch another page that holds another image in a larger format, but is there a way to do this without using the button?
    The image does have the onclick JavaScript property, so I suppose that it could be used in some fashion, but I was thinking that maybe there was a way to integrate this with the page navigation built in to JSC (although looking at it I cannot see how).
    So, is it just a JavaScript thing needed (I'll try to look up how on the Internet if so) or is there a built in JSC way?
    Thanks!

    I have some images on a JSC created page. I'd liketo
    give the user the ability to click on the imagesand
    have another web page brought up that shows alarger
    version of the image they clicked on.
    How can this be done?
    I know how to do it using a button that would sit
    under each image that would then launch anotherpage
    that holds another image in a larger format, butis
    there a way to do this without using the button?
    The image does have the onclick JavaScriptproperty,
    so I suppose that it could be used in somefashion,
    but I was thinking that maybe there was a way to
    integrate this with the page navigation built into
    JSC (although looking at it I cannot see how).
    So, is it just a JavaScript thing needed (I'll tryto
    look up how on the Internet if so) or is there a
    built in JSC way?
    Thanks!
    Did you have a solution? You quoted my original message but didn't add anything to it.
    Anyway, I'm adding a few Duke Dollars to see if that will elicit some responses.
    Maybe this just cannot be done, and we need a new version (one that works with action events) of the HtmlGraphicImage that Creator provides.

  • How do I move an iTunes library from one external drive to another?

    I need to move my iTunes library from one external disk to another, because the original disk is about to fail. So, I went into iTunes Perferences --> Advanced, and set the library to a new, empty folder on the new drive.
    Nothing changed. I expected all my music to vanish from iTunes, so that I would have to re-import it. However, all the music remained, still on the old disk. At this point, if I were to recreate the library on the new disk, I would have all of my music twice.
    Is it possible to move an iTunes library from one external drive to another, or am I stuck with my original choice until I buy a new machine? If I can move it, can one of you clever folks explain how it could be done?

    Paul Seymour1 wrote:
    However, those are all dealing with old versions of iTunes that still contained the Advanced --> Consolidate Library command which is no longer part of the app. (I'm on iTunes 10.6.1.)
    Consolidate is still part of iTunes.
    It is in iTunes menu File > Library > Manage library > Consolidate.
    The article you linked to is old and it is (and was) a hacky way of doing it.
    Just copy the entire /Music/iTunes/ folder to new location, hold Option (Mac) or Shift (Windows) when launching iTunes.

  • How to Move Music Library from one external HD to another

    I had about 60GB of music on an external hard drive, nicely organized and "linked to" from iTunes (just upgraded to version 5). I recently purchased a larger external hard drive and basically copied the contents of my older external drive to the new one, preserving all folder structures from the root of the drives down (but the name of the drive itself is different.) I was hoping I could just do a search/replace of the "iTunes Music Library.xml" file in my Music/iTunes folder, to replace the name of the old drive (volume) with the new one. I did, and iTunes launches fine, preserving my playlists, song ratings, etc... but whenever I try to play any of the songs, it says it can't find it (I can manually point iTunes to it, but I don't want to do that for 15,000 songs...) Strange thing, though, is that if I quit out of iTunes and re-open the Library XML file, all the paths have been reset to their original location!! What am I missing? Thanks in advance,
    Jesse

    I just want to add that the iTunes folder (with the library xml file and such) is on my local hard drive, in the typical Music/iTunes location. I don't want to simply re-import the songs 'cuz I'd lose playlist contents and ratings, and I don't want to "consolidate" the library because I want to keep my music folders and filenames as I currently have them. Basically, I just want iTunes to realize the songs have simply changed location from one external drive to another... thanks again.

  • HT201320 How can I switch from one email user to another?

    How can I switch from one email account to another?

    You have to select between the two accounts in the mail app.
    Say for instance that you are reading an email in your XYZ email account. Tap the button in the upper left corner of the mail app to back out all the way to where you can see all of the email accounts.... Tap InBox, then tap XYZ email Account and that will take you back to the main MailBoxes window.
    Is that what you want to know? There is no way to simply "toggle" between the two accounts.

Maybe you are looking for

  • Copying data to multiple fields

    I have a number of forms which have been created in Acrobat 8 Professional using the Acrobat tools (not LiveCycle) where I need data entered in one field to copy to another. Usually this data is text. I have used the following Javascript in the Calcu

  • How to make use of javascript functionality in WD application?

    hi, I want to use some javascript functionality in my web dynpro application. This is my requirement: I want to design templates for User's ID card. For that , I need to use label, image area, headings in that template as drag and drop objects(so tha

  • Query Execution Time for a Query causing ORA-1555

    dear Gurus I have ORA-01555 error , earlier I used the Query Duration mentioned in Alert Log and increased the Undo Retention as I did not find th UnDOBLKS column of v$undostat high for the time of occurence of ORA-01555.. But new ORA-01555 is coming

  • Setting date format for the entire SQL Server installation - SQL Server 2008 R2-2012

    Hi, I need to safeguard the behaviour of SQL codes that inserting into SQL tables with some date columns. For this purpose, I need to change the date format for the SQL instance and not using CONVERT and CAST. I've seen the SET DATE FORMAT statement,

  • How to "Reload Domain" via Java / Command line

    Hi, I am looking for a way to do the same as the button "Reload Domain" in enterprise manager does, but I need to do it from command line or from java. We have multiple CMSDK nodes running on different servers. As the ifsctl command runs into very lo