How do determine shown card in card layout

Hi, each of my cards is an extended JPanel. I have to run some code, but the code thats needs to be run is dependent on which extended JPanel is currently shown in my card layout (because the code to be run is part of the extended JPanel). So, is there an easy way to get the object that the currenly displayed card is so that I can call methods on that object (one of the extended JPanels)?
Since the card layout is just the layout of a JPanel anyway, I thought I might just try to call the methods on that panel. But since that is just a normal panel, it doesn't know about the methods I need to call. And I'm not sure if I could just cast it (but even if I could, I wouldn't know what to cast it to because I dont know which cards is currently displayed, and hence which type of extended JPanel to cast it to)
Thanks in advance,
-Marshall

There are different ways to do this. One of the easiest is to keep track of the index of the card that is showing and use this to access the reference to the component you put on that card. You can track the index in your event code.

Similar Messages

  • How do I get my sd card out of the cd slot.. I have tried the method shown on youtube and it is not working

    How do i get my sd card out of the cd slot.. I have tried the method shown on youtube and it's not working

    Shut down the machine, turn it on it's side and shake it out. If you still can't get it try another solution on YouTube, there are many shown. We Have no idea which one you tried. If you still can't get it out take the machien into your local Apple Store or AASP and they will help you.

  • HT204088 how do I determine if a credit card charge may be wrong

    How do I determine if a credit card charge may be wrong?

    Download again, move the existing file out of the applications folder first.

  • How can i remove my credit card from app store, the none option its not there and i don't Owen  nothing to apple, my last in app purchase was in clash of clans, please help!!! Because of that problem i cant update my apps! Plz help!!!!!

    How can i remove my credit card from app store, the none option its not there and i don't Owen  nothing to apple, my last in app purchase was in clash of clans, please help!!! Because of that problem i cant update my apps! Plz help!!!!!

    You've logged into your account and viewed your purchase history and there aren't any error messages shown (e.g. 'problem with a previous purchase'), and you haven't got any purchases due (e.g. pre-orders and/or subscriptions) : Why can’t I select None when I edit my Apple ID payment information ?

  • HT1379 Summary: how to transfer files from SD card when the system (Mac OS X v 10.7.5) will NOT recognize SD cards.

    How to transfer files from SD card when the system (Mac OS X v 10.7.5) will NOT recognize SD cards?
    Insert the SD card.
    System opens iPhoto with SD contents.
    Want to transfer files from SD card to system drive.  iPhoto closes
    SD card directory removed from the Finder window and is not available again. 
    I don't want to have to reboot the system every time I want to perform this option.
    What's wrong here. 
    The support columns show this isn't an isolated incident with all sorts of solutions possible.
    This is a simple task - there should be a simple method for the system to recognize SD cards.
    What's the answer?
    I've reviewed a recommendation to reset the SMC.
    https://discussions.apple.com/message/18500187#18500187
    and
    http://support.apple.com/kb/HT3964
    and another thread that says, basically, you must buy extra hardware to perform this simple task,
    https://discussions.apple.com/message/16911326#16911326
    another one that has the same problem with OS Mountian Lion,
    https://discussions.apple.com/message/21919740#21919740
    another one with the problem that says SD cards can't be read by Apple unless the card is formatted specifically for Apple, ie. that Apple is not compatible with other cards, but the problem maybe something else that requires Apple service - (bad SD card reader?).
    https://discussions.apple.com/message/18711818#18711818
    there are probably more discussions, but I dont' want to spend my entire sunny in Seattle day working this.
    thanks for the help!

    Bucky Fullmeister wrote:
    When I plug in an SD card, the finder window shows it under the DEVICES section.  At this point, I can drag the contents to the hard drive.  However, when I screw up and click the character on the right side of the name - it apparently closes the SD card and I can't find any command to reload or re-recognize the card.  I have to remove and reinsert the card and then sometimes it recognizes the card.  Other times I reboot and it will recognize it.
    What does that character on the right side of the SD card name do?  Is it an eject function - with no way to subsequently reread the drive?
    It ejects or unmounts the card. When the SD card mounts click on it once to highlight it and then drag the files shown within it to the new folder.
    Pete

  • How can I cancel my bank card from my I tunes account on I pad

    How can I cancel my bank card on I tunes account on I pad pls

    Open the iTunes App and swipe the screen down to where your Apple ID is shown. Touch that and sign-in with your password. You can then edit your Account Settings including your Payment Information.

  • How do i delete my credit card info from my phone. because it wont let me update or download apps because i only have 50 cents on the card

    how do i delete my credit card info from my phone. because every time i try to update or download apps it wont let me because i only have 50 cents on my card. so i need help now before i smash this ****** *** phone and go with a galaxy s5

    This does not make much sense.
    Please explain.
    Are you getting an error message?  What does it say?

  • Hi can some one help me..i dont know how to use my itunes gift card.

    hi,
    i need help on how to use the itunes gift card on the itunes store..i only have my credit card on file and i am trying to add it to my account but theres no where that its says i can add a gift card..can someone please help me w/this.
    thanks,
    veronica

    http://www.apple.com/itunes/
    Go there and scroll all the way down to the bottom. At the links at the very bottom, all the way to the right, there will be a link under 'iTunes Store' that says 'Redeem iTunes Giftcards'
    Hope that helps

  • How do I remove a credit card from my Apple-ID?

    How do I remove my credit card from my Apple-ID? I can't download any apps now because it says I need to update my billing information (doesn't matter if the app are free or I have to pay for it), and when I try to do that, this error message comes up: "Debit Card can not be used. Please enter valid credit card information".
    I've double checked everything and nothings wrong? Still that message comes up.
    ******* Apple.
    Please help? What can I do?

    You've followed the instructions on the HT1918 page that you posted from for removing credit card details ? If you don't get the 'none' option on your account then see if anything on this thread does : https://discussions.apple.com/message/19231438

  • How to I take my credit card information off and put no payment info like back how it first started, and how do I do that by my iphone?

    I need help,
    How do I take my credit card information off and put none payment
    And how do that by my iphone. With out using a computer.
    Because when I use my credit card and I know I have money on it
    It says decline so I wanna take that off so I can download apps without using
    My card or an iTunes card. Like down load the free apps without card info.

    Hi ShyGirl07,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Why can’t I select None when I edit my payment information?
    http://support.apple.com/kb/ts5366
    I hope this information helps ....
    - Judy

  • How can i delete my credit card i lost my card so i cant use it anymore so i wanna delete that.

    how can i delete my credit card on my apple account? i lost my card so i can't use it and because of that i can't use my account to update or download apps plz help me asap

    On your device:
    Settings > iTunes & App Stores > tap ID > sign out > sign in with corrected credit card info
    On your computer iTunes:
    iTunes menu > Store > View account > edit payment type

  • HT4436 How do I delete my credit card information

    How do I delete my credit card info it won't let me download any apps or update. I want to remove it but don't know how.

    This guide will tell you how to change your payment information: http://support.apple.com/kb/HT1918.  If, however, you want to purchase free apps without a credit card, you'll have to create a new ID by following this guide: http://support.apple.com/kb/ht2534.  (Note that you have to start by installing any free app, then create the ID.)

  • How do I get my credit card info off my account

    I can't download any apps from App Store because it tells me there was a problem with the last purchase I mad.the credit card I have on fill is no longer active.How do I get the credit card off so I can download apps and update my app.PLEASE HELP

    Changing Account Information  >  http://support.apple.com/kb/HT1918
    caitieob wrote:
    I cant download ... cause the credit card on file is cancelled and it gives me no optio. To remove the info.
    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • HT204053 How do I remove my credit card from my account? Right now I have debit or credit card and when I try to download a free app like Facebook, it tells me to update my billing info and won't accept it blank. It says I owe for a previous purchase.

    How do I remove my credit card from my account? Right now I have debit or credit card and when I try to download a free app like Facebook, it tells me to update my billing info and won't accept it blank. It says I owe for a previous purchase.

    Sorry- edited:
    How do I remove my credit card from my account? Right now I have no* debit or credit card and when I try to download a free app like Facebook, it tells me to update my billing info and won't accept it blank. It says I owe for a previous purchase. So take it back and unlock my ability to DL free apps.

  • How do I remove my credit card from my account and still download free apps. Bc that card is no more good anymore the App Store will not let me download any apps . I no longer have a credit or debit card.so PLS help

    How do I remove my credit card from my account and still download free apps? because that card is no more good anymore the App Store will not let me download any apps . I no longer have a credit or debit card.so PLS help

    On your iPad tap on your id in Settings > iTunes & App Store and tap on 'View Apple ID' on the popup and log into your account  - that should give you a payments link on your account's page. Or on your computer's iTunes you should be able to edit your payment info by going into the Store > View Account menu option and logging into your account, and on your account's details page there should also be a payment link.
    Changing payment info : Change or remove your payment information from your iTunes Store account (Apple ID)
    If you don't get the 'none' option on the payment details screen : Why can’t I select None when I edit my Apple ID payment information?

Maybe you are looking for

  • How to reverse a PSD file that's combined layers into one layer...

    Hi, I'm not quite sure what happened but I had a PSD file I was working on with multiple layers and then I saved a PDF of the file and I think I may of accidentally switched up the files somehow because now my PSD file's layers are all combined into

  • Mail is demanding "a preferred outgoing mail server", but in MAIL; help, it doesn't exist.

    I finally got mail working for the first time in three years, but everytime I log in, it pops up an error window over an old message, and says it couldn't be sent because I don't have "a preferred outgoing mail server". Now how would you find out how

  • Client ABAP proxy error handling. Please help!

    Hi Experts,    I have following scenario:    SAP ECC (ABAP Client Proxy) -> PI(XI)-->(SOAP) Third party web service System    This is Asynchronous.    What will happen when ABAP client Proxy in ECC sends data to PI but PI is down?    Will the message

  • Serial numbers in sales order/delivery

    Hi All I have a question question on Bar code number generation. Please note that this is NOT a question on bar code printing or issuing output to printer. One of our customers requires serial numbers for all the products that we supply to them and t

  • Deleting old archivelogs

    Hi, Can anybody provide me a shell script which can delete 1 week old archivelogs? Note : I am not using RMAN. Thanks in advance...