Making buttons for an ArrayList

I am in a hurry as this program has to be handed in tomorrow so quick replys would be helpful.
I dont know how to make buttons in my GUI for an ArrayList and have it respond individualy with the name of the button i.e. i want to make it so that when you click on the drill button it will get take the label of that button and return it as a string. The problem is making the individual buttons that will respond to individual commands.
Im pretty sure that made no sense but im out of ideas.

Disregard the previos post i was doing it wrong.
Ive realised that the main problem is that is ignoring this
else if (event.getSource() == y)
                String text = ((JButton)event.getSource()).getText();
                game.playGUI("grab "+ text);
                frame.dispose();
                makeFrame();
            }

Similar Messages

  • In making a form, I've used buttons for user to select a state. Can I make it go to cities next?

    I don't know the correct terminology, so I don't think that I've posed my question very well.  Employees will be using the form that I'm trying to make, and I want for them to be able to select a city from a large number of cities, and for that city to ultimately show up on the form (not merely in the data that is output.)
    I thought that the clearest way for them to select a city would be for them to start by selecting the pertinent state first.  That would allow the list of cities in that state to be shorter and more manageable.  So I'd like for them to be able to select a state, and then by virtue of that selection, have a list of cities pop up.  I sort of achieved that by using buttons for the states, and then under "actions", I chose "open a file".  Then I set it up to open a file that contained the cities that are options,and set each city with a button. 
    The result is that it goes from my form to a second window, containing states and then to a third window, containing cities.  (Actually, there are multiple "city" windows because there's a list of cities for each state.)  But then I'd like for the city that they select to wind up being on my original form.  Is there an "action" that I can choose that will make that happen?
    Or is there a better way to accomplish what I'm trying to accomplish?  Maybe I'm just going about this all wrong(?) Any suggestions would be very much appreciated  Thank you!

    Yes, there is a much better way. I'd recommend using a combo box for the list of states. When the user selects a state, the list of associated cities would populate a second combo box, allowing the user to select a city. This type of functionality relies on JavaScript. If you are unfamiliar with with JavaScript in Acrobat, I'd suggest starting with the following article: http://acrobatusers.com/tutorials/2007/js_list_combo_livecycle/
    Ignore anything to do with LiveCycle Designer. If you get stuck, post again.

  • Making a button for a third party plug-in

    Hello there,
    I've just downloaded and started playing with Configurator.
    My problem is that I would really like to add buttons for two
    plug-ins I've added to photoshop.
    (Picturecode Noise Ninja and Alien Skin Exposure 2).
    These plug-ins do not appear on the drop down list in
    Configurator.
    Is there any way I can modify the script box in order to
    launch a non-standard plugin?
    Similarly, I have a Script (Showit Borders) that I'd like to
    make a button for.
    Many thanks,
    Miller.

    id try it but i use neatimage for noise...
    your actions are all created with selecting a new action,
    then going to INSERT MENU ITEM within the actions panel so that you
    could then manually add a plugin to your action, yes?
    as opposed to actually hitting RECORD for a new action and
    then going to the plugin within the normal dropdown menu, which
    might then cause problems with some plugins, because your not just
    adding the plugin window to popup this way, your adding the plugin
    window to use the settings you recorded with, and if its noise
    reduction, it could be trying to pull the exact-named file into its
    profiler...im just taking a stab at the cause...

  • A few questions on making animated buttons for a website Nav

    Hello, I have a few questions on creating some animated buttons for a nav.
    There are 2 actions I want to trigger on moue over.
    If I want to use a static (PNG) image that I created in Photoshop for the actual button, can I use that? I want to smoothly slide button down on mouse-over and slide back up on mouse off. If I push part of the button off the "canvas" (sorry, this is coming from a Photoshop guy) will it disappear in the final animation? Another way to put that is, if I put an animated element off the white area, will it no longer show up in the movie (.swf) when it's published?
    For the second part; you can see a bit of what I want to do if you look at this website's top Nav: http://www.photoshopsupport.com/index.html
    I need the "light" above the button and it's going to be on another colored <div> so I can't set one solid BG color for my flash document. But I want to achieve the effect of the "bar" lighting up above the button and the actual button sliding down upon moue over.
    Any help you can provide would be greatly appreciated.

    Hi,
    Regarding this button problem mentionned by kglad, it is easily overcome with a little trick.
    I call this the undesired "jumpy button". Your button starts to hesitate down-back-down-back quickly, like it's a bug, and then it settles.
    What you could do is create a simple sprite or movieclip containing only a simple shape, whatever the color, put it on top of your button's graphic, change this sprite/movieclip's alpha to 0, then add your mouse events on this invisible "target" instead of your graphic. So, when you mouse over, you have the graphic move, not the invisible "target".
    Sometimes, for this invisible target, you will be using a movieclip, not a sprite, so you can easily add your own properties on it.
    Example:
    var graphicBtn:Sprite; // your png
    var targetBtn:MovieClip; // your invisible target, created with code or not
    targetBtn.graphics.beginFill(0x000000);
    targetBtn.graphics.drawRect(0, 0, graphicBtn.width, graphicBtn.height);
    targetBtn.alpha = 0;
    targetBtn.mygraphic = graphicBtn;
    targetBtn.addEventListener(MouseEvent.MOUSE_OVER, onOver);
    targetBtn.addEventListener(MouseEvent.MOUSE_OUT, onOut);
    addChild(graphicBtn);
    addChild(targetBtn);
    function onOver(event:MouseEvent):void
         TweenLite.to(event.target.mygraphic, 0.25, {y:40, ease:Back.easeOut});
    function onOut(event:MouseEvent):void
         TweenLite.to(event.target.mygraphic, 0.25, {y:0, ease:Cubic.easeOut});
    So you see, you can have only one function (well, 1 for over, 1 for out) used for all your buttons. You can add as many properties you need on your movieclip to make that one-function flexible.
    Here I used GreenSock's tweening engine, but use the one you prefer (Here, I am moving the graphicBtn in y for 0.25 second).
    Design Cyboïde
    Création de sites web

  • Single Go button for all prompts - without making changes to system files

    Hi All,
    I went thru several threads and blogs which suggest to do certain changes in the .js files to get a single go button for a group of prompts (saved as individual objects)
    Is it possible to have single go button in 11g for prompts which are saved separately without changing the system files?
    Many Thanks,
    RS

    Hi,
    I dont think so. But in 11.1.6 version there is a feasibility to avoid apply and reset buttons. so that will make to appear all the prompts together.
    And you can try to built a common prompt filter with all the columns, but it will be bad and cause lots of problems.
    Hope this helped/ answered.
    Regards
    MuRam

  • Making button and a html site in visual studio community version

    Hi,
    I like to Making button and a html site  in visual studio community version but i dont know how to put the right code in my c# form to perform a action to my new html site i made with visual studio.
    So ik have a button and i added a html site with the "add" options to my form.I want the button to open onclick that site so i can make a html about some info of the button image (tool to use with metal)
    Any one? Sorry i am very new at this and also from the netherlands but i want to  coding in c# great to to learn..
    Many thanks!
    Arend

    Hi Arend,
    Thank you for posting in MSDN forum.
    Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance
    Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. Based on your issue, I think that the issue is more related to the programming. So I’m afraid that it is not the correct forum for this issue.
    To help you find the correct forum for this issue, could you please tell
    me which kind of app you want to create? Is it winform app or others?
    If you want to code for a winform app using c# language, I suggest you
    can consult your question on specific
    WinForm forum so that they can share you something for you to start.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I cannot find information to help me change the orientation of a video filmed in portrait format but only able to be played back lying on its side  (landscape) instead of upright. All the rotation buttons for iPhoto are not 'engaged' when it is in video .

    I cannot find information to help me change the orientation of a video filmed in portrait format but it can only able to be played back lying on its side  (landscape) instead of upright. All the rotation buttons for iPhoto are not 'engaged' when it is in video .

    Thanks OT,
    I tried the Export function but it would not allow me to choose the option of exporting to iMovie. I think you are right about needing Quicktime Pro. I opened iMovie and imported the clip from iPhoto and with some searching found the 'cropping, rotation' mechanism. So I now have a copy in the correct orientation. I plan to import/export it back to iPhoto because I want to have a copy on my iPhone to show people and I wanted to have it available as part of a slideshow I am making in iPhoto of my recent overseas trip. It is a pain that there is no simple orientating tool for the movie clips downloaded to iPhoto with the photos from the one camera.

  • Where is the button for HP Director in Windows 7?

    Where is the button for HP Director in Windows 7?  Trying to find the printer cartridge ink levels.  This is very easy to do on Canon printers.  Hopefully I can accomplish the same thing on an HP in at least a day.  I've been looking for about an hour, so far.
    Very frustrated.

    One ? should suffice, and why the capital letters?  Try to remain calm.  I know Photoshop can be frustrating, but In the grand scheme of things your inability to find a control in an application you're using really doesn't need such emphasis...  Please look up "netiquette" when you have a chance.
    Try hovering your cursor over things and look at the ToolTip help balloons that pop-up.
    You can add a Layer Mask by choosing Layer - Add Layer Mask from the menus.
    If you're seeking the icon on which to click to begin painting on a Layer Mask, this is the one you want:
    If you are talking about making layers visible or invisible, that's the little eyeball icon at the left of each layer in the Layers palette.
    -Noel

  • How do I include an entire hour-long performance on a DVD and also have menu buttons for playing isolated sections of the performance?

    How do I include an entire hour-long performance on a DVD and also have menu buttons for playing isolated sections of the performance?
    So far, I've already done the individual menu buttons for sections of the performance. How do I set up some kind of "play" button that will play the video of the entire performance straight through? Will this be too much material for the DVD to hold? Does the program recognize and not replicate material to save space? If so, will it interfere with that if  I add edits to individual sections that will not be in the video of the entire performance?   

    Hi
    If You only need
    • Play movie in full
    • Start into the movie at specific places e.g. Chapters - then play to movie ends
    Then this is fairly simple - Just add Chapters in Your Video-editor (iMovie or FinalCut)
    (some quirks to keep in mind - No Chapter mark in any transition or within 2 sec from it - AND - only Lettera A to Z and 0 to 9 - no other letters/symbols at all)
    BUT
    If You want to
    • Play full movie (with or without Chapters)
    • Play an individual Chapter then return to Menu
    This function is not standard in iDVD - but has to be faked one way or another.
    Please read my notes on this and be aware of the 60 minutes / 12 minutes limit in iDVD (THIS is including the Menu and it can take 15 minutes or more from the movie time)
    Play all resp one chapter at a time
    Play All Button
    1. There are NO - Play All - button in any version of iDVD
    2. It can be faked in several ways
    • Easiest and most fault proof way is to make a doublet movie containing All and with
    Chapters set to match. It will take up x2 space but is easy to understand and produce.
    Cons: Tried this in iMovie’11 by Exporting out each part as a full Quality QT.mov then Importing back into new events and putting these into a new project (Play All project). Resulting DVD had Audio that was OK (as parts) - BUT the picture was very bad and standing photo were cut of in hight. So the Play All movie has to be created from same material and exactly in the same way as the individual parts + then Chapters has to be set to match.
    • It's said that one can put all movies into a Photo/SlideShow and this will also
    give the function of a Play All button - Tested - and ONE HAS TO un-cheque - Scale pictures to TV-Safe area else it will be a black frame all around and a small picture !
    Cons: BUT - When tested with music videos - the same video on main Menu played nicely with OK Audio. The Play All version in SlideShow had a signifcant Distortion - as on telephone or worse.
    Mike Evangelist1
    You might be able to get close to what you want by using a slideshow in iDVD. (It's not widely known, but you can put videos in a slideshow.) If you set the slide duration to manual, playback will pause after each movie/slide, and you can continue with the 'next' button.
    3. Using another program to do this e.g.. Roxio Toast™ where there is a Play All button option.
    Summary
    a. Making a Play All movie with same care as the individual Part movies - gives a very Good Result
    b. Using Roxio Toast™ - also an usable way to go
    Yours Bengt W

  • Stop button for soundboard

    I need help making a stop all sounds button for my
    soundboard, can somebody give me a step by step please.

    At the risk of sounding preachy I will say you should forget about the stacked sequence structure. Pretend it is not even there. The flat version has some uses such as when benchmarking code but the stacked one with sequence locals is completely wrong for any application. Just a word of advice and if your existing program does what it needs to do there is not really any reason to change it. But if you plan on significantly expanding it or if you develop a new program then get the stacked sequence structure out of your mind.
    Use state machines instead. There are plenty of examples all over the forums. They are just a while loop with a case structure and at least one shift register. I think you understand case structures and while loops so the only other thing you need to know about is the shift register. With these three concepts understood it is easy to create state machines in LabVIEW. They will make your life so much easier.
    =====================
    LabVIEW 2012

  • Making buttons

    Hello. Trying to learn some graphics by making 2 frame classes I will call from my main. But my first class where I whant to make an quit button dosent compile. Any tips why?
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    // View class who creates an quit button for the JFrame
    public class View extends JPanel{
        private JButton quit;
        // Create the Quit Button
        public QuitButton(){
            JButton quit = new JButton("Quit");
            add(quit);
            ActionListener listener = new clickListener();
            quit.addActionListener(listener);
        // Tell the JButton to quit the JFrame when pushed
        public class clickListener implements ActionListener{
            public void actionPerformed(ActionEvent event){
                System.exit(0);
    // error: invalid method declaration; return type required (Line 12 - public QuitButton(){ )And when I try to set "QuitButton" to "void" I?m getting:
    "cannot find symbol - class ActionListener" @ line 21 where I try to implement ActionListener.

    Ok. All my classes are done now and compiling just
    becouse I have put the all to be "void". And this
    leads to no results so apparently they need to have a
    return type as you said. Can we maybe look at my most
    simpel class who are supposed to draw the
    rectangle?(It compiles but I guess it dosent do
    anything with void as a type. If I change to "static"
    it says once again it need a return type. Any idea?)Do you call the Rectangle method on that class? If you don't, then it will never run, and nothing will be drawn. Perhaps you want to put that drawing code in the paintComponent() method, so that it will be drawn as part of the JPanel? If you want the Rectangle method to be treated as a constructor, then you have to give it the same name as the class:
    public View() {   // a constructor
    public void Rectangle() {   // a method
    }Painting: http://java.sun.com/docs/books/tutorial/uiswing/painting/index.html
    Constructors: http://java.sun.com/docs/books/tutorial/java/javaOO/constructors.html

  • My safari menu bar is missing --the menu bar for desktop, HD, and apps appears, but when I click on Safari, it disappears, so I can no longer see my buttons for History, etc.  I think my husband (pc user) clicked it away.  Any ideas how to retrieve it?

    My safari menu bar is missing.  The menu bar for desktop, HD, and apps appears, but when I click on Safari, it disappears, so I can no longer see my buttons for History, etc.  I think my husband (pc user) clicked it away when borrowing my computer.  Any ideas how to retrieve it?  Thanks. 

    I too was having the same problem However, I could access both the menu bar and the dock by hovering my mouse over them so it wasn't a huge problem but I prefered having it there anyway. I was not in full screen mode and I could still go into full screen mode if I wanted to.  I found the easiest solution was to just quit safai and restart it, but it might not work for you considering you couldn't access you menu bar either way.
    I found this article that allows you to hide/show the menu bar and the dock through TextEdit (didn't work for me) http://www.mactricksandtips.com/2009/07/hide-the-menubar-or-dock-in-specific-app s.html It is pretty old so it might not work for lion and a bit risky if you don't know what you're doing so I wouldn't really recommend doing it this way.
    And KSheppard, I know it's not really any of my buisness, but the way to get answers to a question isn't by insulting others and being quick-tempered. Even if you feel like you were insulted first, don't try snapping at people who aren't obligated to help you. Honestly, it just makes everything easier if everybody is cooperative and polite.

  • How do I disable "Exceptions" button for "Block pop-up windows" in Content tab?. I am able to Disable other Exception buttons in this tab using about:config preference.

    Need a way to disable "Exception" button for "Block Pop-up windows" in Tools-> Options -> Content tab. I want to be able to do this for Locking Down Firefox preferences.
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    That button doesn't have a pref associated with it, so you can't disable that button with a pref on the about:config page or a lockPref call.
    That only leaves the choice to remove that button with code in userChrome.css
    <pre><nowiki>#popupPolicyButton {display:none!important;}</nowiki></pre>
    See http://kb.mozillazine.org/Editing_configuration#How_to_edit_configuration_files

  • How do I create a submit button for my form? I would like it to send the completed PDF to an email address

    Hi everyone,
    I recently upgraded to Adobe XI and I can't find a "submit by email" button for my form. I created a button and tried to set up some actions but, I can only get the button to direct the user to a URL. How do I make it send the completed PDF to our designated company email address? I'm not too familiar with JAVASCRIPTS so I haven't tried that plus I heard it may not work with users with adobe reader.
    Any help would be appreciated.
    Thanks,
    Matt

    Thanks for the input. I think you might have a different version of LiveCycle than the copy I have since it looks a little different. However, I found the answer in Adobe help. I had to type "mailto:" before the email address to indicate it's an email and not a URL. See below.
    To collect form data as attachments to email, type mailto: followed by the email address. For example, mailto:[email protected]

  • I opened my iPod Touch up to fix my home button. When i closed it back up it had a white screen. I tried pressing lock and home button for 10 seconds and it worked but while i'm using it it goes white with lines on the screen. Help please

    I opened my iPod Touch up to fix my home button. When i closed it back up it had a white screen. I tried pressing lock and home button for 10 seconds and it worked but while i'm using it it goes white with lines on the screen. Help please. This has been happening for a while and i've tried everything but it doesn't work.

    Try:
    fix for Home button
    iPhone Home Button Not Working or Unresponsive? Try This Fix
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    You can do it an an Apple store by:
    Apple Retail Store - Genius Bar
    or sent it in to Apple. See:
    Apple - Support - iPod - Service FAQ
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

Maybe you are looking for

  • 2 color PDF shows 4 color in Acrobat

    We have been using 2/c file for Indesign CS2 document (Magenta & Black). However we were able to findout, select the Output Preview menu in Acrobat and turned off Magenta and Black it shows the rest of the color. InDesign shows by using Seperation Pr

  • Which is better? PSP or JSP

    Can anybody explain, PSP is better or JSP..

  • SD billing with excise duty

    Hi All I am creating SD billing for factory sale (pricing procedure JINFAC), which is involved excise duty as well. VF01 is creating two doc , one for Billing document and one for Excise JV (as we opted Excise invoice during billing). The issue is  i

  • Vertical Hold problem

    I have successfully connected my 5th gen Ipod to my television using A/V cables and the S-video cable. I can see I-tunes-purchased video and my pictures and the audio is present. My issue is that the picture rolls and the contrast is a little off to

  • HT204057 My OS X.5.8 doesn't perform backup function to Time Machine

    I don't know why my Time Machine no longer performs the back-up function.  What can I do?