Removing more than one listener at a time?

I have a JPanel that has lots of Buttons, each is being listened to by the class that made made them
ie
myFirstJButton.addActionListener(this);
At a certain point of time I want to delete the JPanel that contains the buttons
Is there a way to not have to go thru the buttons and remove all the listeners?
maybe when I delete the JPanel
all the JButtons no longer have a parent and so are deleted too, and so can no longer create an event?
maybe there is a method like
this.stopListeningToAnything();

not really (unless proven otherwise ;). is this a major concern for your app?
listening is nothing 'active' ie CPU consuming. if a component receives an event it will go through the list of registered listeners and dispatch the appr. event.
so, if your component never generates an event (because it is invisible or in your case doesn't exist) nothing will happen.
the only resource you might use up is some memory...
thomas

Similar Messages

  • Can I use a magic trackpad with more than one Mac at a time?

    I am attempting to pair a MTP with a second MacBook Pro.  So far I can't get system preferences to find the MTP.
    I am wondering whether the MTP can be paired with only one Mac at a time, and that this is why my MBP won't find it.
    The reason I am thinking this is because the little booklet that comes with the MTP says 'after you pair your MTP with a Mac, you can pair it again with a different Mac.  To do this, you first remove the existing pairing and then pair the trackpad again'.
    Can anyone advise, please?
    If it can be paired with more than one MBP at a time, any suggestions why my system preferences search for the MTP is not producing any results?
    Thanks

    Yes, your keyboard, mouse or trackpad can be paired with multiple Macs.  You can even have multiple keyboards, mice or trackpads paired with one Mac.  The caveat is that the device can only be connected to one Mac at a time.  The device can't be paired or connected with a Mac while it's currently connected to another.
    Pairing a device with 2 Macs will be troublesome if the Macs are located within 33 ft of each other.  The device will connect with the first available paired Mac and then unavailable to the second.   If the Macs are located outside the 10meter range, it's quite easy to power off the keyboard (forcing a disconnect) then walking the keyboard to Mac 2 and powering the keyboard on.   I do this with a keyboard from my iMac to a Mac Mini in another room.
    Captfred

  • How to delete more than one photo at a time

    Apparently there is no longer an iPhoto trash. So you don't drag photos to the trash. Instead you hit the delete key and then a second click on delete when you get the message "Are you sure you want to delete this photo." Has anyone found a way to delete more than one photo at a time, though? This is really a hassle if you have just imported 500 photos and are going to end up deleting 450 of them.

    I didn't say use the command key and delete. I use the command key for selecting random photos. Then I right click and choose delete from the contextual menu.
    I always use right click, but the command-delete does work also in that album.
    Depending on what album you are in, there are different menus. In a user created album, the right click would show "Remove from Album" & "Delete Photo". I noticed that was the same for Last Import Album. But at the same time, under image, you will only have Remove from Album. If it is a system album, you will only get the delete menu from either the right click or from the menu under Image.
    What you have to remember is if it days delete the photo, it will completely delete it from the library and all albums. If the menu says Remove From Album, then it will only be removed from the album you are in.
    In PhotoStream Album, you get only Delete Photo from the right click menu, but under image, you get only remove from album. So if you want to remove an image from PhotoStream, you have to use the top menu so it won't get deleted from the library. If you want to remove a photo completely, you would use delete and it will be removed from the library and photo stream.
    So, there are different processes for the different albums. I don't know if that is intentional or just oversight. That may change in the future.

  • Is there a datatype that allows me to store more than one item at a time

    Hello Everyone,
    Is there a datatype that allows me to store more than one item at a time , in a column in a row?
    I have to prepare a monthly account purchase system. Basically in this system a customer purchases items in an entire month as and when required on credit and then pays at the end of the month to clear the dues. So, i need to search the item from the inventory and then add it to the customer. So that when i want to see all the items purchased by a customer in the current month i get to see them. Later i calculate the bill and then ask him to pay and flushout old items which customer has purchased.
    I am having great difficulty in preparing the database.
    Please can anyone guide me! i have to finish this project in a weeks time.
    Item Database:
    SQL> desc items;
    Name Null? Type
    ITEMID VARCHAR2(10)
    ITEMCODE VARCHAR2(10)
    ITEMPRICE NUMBER(10)
    ITEMQUAN NUMBER(10)
    Customer Database:
    SQL> desc customerdb;
    Name Null? Type
    CUSTID VARCHAR2(10)
    CUSTFNAME VARCHAR2(20)
    CUSTLNAME VARCHAR2(20)
    CUSTMOBNO NUMBER(10)
    CUSTADD VARCHAR2(20)
    I need to store for every customer the items he has purchased in a month. But if i add a items purchased by a customer to the customer table entries look this.
    SQL> select * from customerdb;
    CUSTID CUSTFNAME CUSTLNAME CUSTMOBNO CUSTADD ITEM ITEMPRICE ITEMQUANTITY
    123 abc xyz 9988556677 a1/8,hill dales soap 10 1
    123 abc xyz 9988556677 " toothbrush 18 1
    I can create a itempurchase table similar to above table without columns custfname,csutlnamecustmobno,custadd
    ItemPurchaseTable :
    CUSTID ITEM ITEMPRICE ITEMQUANTITY
    123 soap 10 1
    123 toothbrush 18 1
    ill just have it as follows. But still the CUSTID FK from CustomerDB repeats for every row. I dont know how to solve this issue. Please can anyone help me.
    I need to map 1 customer to the many items he has purchased in a month.
    Edited by: Yukta Lolap on Oct 8, 2012 10:58 PM
    Edited by: Yukta Lolap on Oct 8, 2012 11:00 PM

    You must seriously read and learn about Normalization of tables; It improves your database design (at times may increase or decrease performance, subjective cases) and eases the Understanding efforts for a new person.
    See the below tables and compare to the tables you have created
    create table customers
      customer_id       number      primary key,
      fname             varchar2(50)  not null,
      mname             varchar2(50),
      lname             varchar2(50)  not null,
      join_date         date          default sysdate not null,
      is_active         char(1)     default 'N',
      constraint chk_active check (is_active in ('Y', 'N')) enable
    create table customer_address
      address_id        number      primary key,
      customer_id       number      not null,
      line_1            varchar2(100)   not null,
      line_2            varchar2(100),
      line_3            varchar2(100),
      city              varchar2(100)   not null,
      state             varchar2(100)   not null,
      zip_code          number          not null,
      is_active         char(1)         default 'N' not null,
      constraint chk_add_active check (is_active in ('Y', 'N')),
      constraint fk_cust_id foreign key (customer_id) references customers(customer_id)
    create table customer_contact
      contact_id        number      primary key,
      address_id        number      not null,
      area_code         number,
      landline          number,
      mobile            number,
      is_active         char(1)   default 'N' not null,
      constraint chk_cont_active check (is_active in ('Y', 'N'))
      constraint fk_add_id foreign key (address_id) references customer_address(address_id)
    create table inventory
      inventory_id          number        primary key,
      item_code             varchar2(25)    not null,
      item_name             varchar2(100)   not null,
      item_price            number(8, 2)    default 0,
      item_quantity         number          default 0,
      constraint chk_item_quant check (item_quantity >= 0)
    );You may have to improvise and adapt these tables according to your data and design to add or remove Columns/Constraints/Foreign Keys etc. I created them according to my understanding.
    --Edit:- Added Purchases table and sample data;
    create table purchases
      purchase_id           number        primary key,
      purchase_lot          number        unique key  not null,     --> Unique Key to map all the Purchases, at a time, for a customer
      customer_id           number        not null,
      item_code             number        not null,
      item_price            number(8,2)   not null,
      item_quantity         number        not null,
      discount              number(3,1)   default 0,
      purchase_date         date          default sysdate   not null,
      payment_mode          varchar2(20),
      constraint fk_cust_id foreign key (customer_id) references customers(customer_id)
    insert into purchases values (1, 1001, 1, 'AZ123', 653, 10, 0, sysdate, 'Cash');
    insert into purchases values (2, 1001, 1, 'AZ124', 225.5, 15, 2, sysdate, 'Cash');
    insert into purchases values (3, 1001, 1, 'AZ125', 90, 20, 3.5, sysdate, 'Cash');
    insert into purchases values (4, 1002, 2, 'AZ126', 111, 10, 0, sysdate, 'Cash');
    insert into purchases values (5, 1002, 2, 'AZ127', 100, 10, 0, sysdate, 'Cash');
    insert into purchases values (6, 1003, 1, 'AZ123', 101.25, 2, 0, sysdate, 'Cash');
    insert into purchases values (7, 1003, 1, 'AZ121', 1000, 1, 0, sysdate, 'Cash');Edited by: Purvesh K on Oct 9, 2012 12:22 PM (Added Price Column and modified sample data.)

  • HT6114 I cannot select more than one message at a time to delete from the trash. Any ideas will be appreciated

    I cannot select more than one message at a time to delete from the trash. I did not have this problem before I updated to Maverick. What am I doing wrong?

    This works in many different ways and in lots of apps.
    Hold down the command key and you can select from a list (leaving some not checked) to exclude them from the delete process.
    To empty all of the trash folder use command-a keys to "select all" and then the delete key to remove them.

  • TS3899 How do I delete more than one email at a time from my i phone 5C

    How do I delete more than one email at a time from my i phone 5C

    With your Mail app open and the listing of the messages, tap Edit at the top right.  Then check each circle on the left side of the messages to delete.  When you have checked those to delete, tap Trash at the lower right.
    Next tap Mailboxes upper left, under accounts select the account, then for the account tap Trash.  Select Edit upper right, and at the bottom, Delete All, and confirm Delete All and all will be removed at one time.

  • Is there a way to reset more than one image at a time?

    I have a folder with 1100 images taken on four different cameras. I have a new default setting for one of the cameras that I would like to apply to most but not all of the images in this folder. I could remove the offending images and reimport, I could filter by serial number and sync a preset. It would be easier, however, if could just select the images I want and hit the reset tool and reset all the images selected. But it only seems to reset the dominant image. Any way to get the reset button to work on more than one image at a time?
    Gordon

    do it in Grid not Filmstrip or Develop.
    Don
    Don Ricklin, MacBook 2Ghz Duo 2 Core running 10.5.1 & Win XP, Pentax *ist D See LR Links list at http://donricklin.blogspot.com for related sites.

  • Search more than one location at a time?

    Hello,
    I spend a lot of my time searching for files in our studio (I maintain the archives, backups, file systems, etc.) and I have to search across a number of locations (a number of local drives, specific locations/folders on various servers, etc.). Right now all our machines in the studio are on Tiger and I'm considering upgrading to 10.5, but the one major roadblock I've come across thus far is the ability to search various locations in 10.5. In 10.4 I was able to select multiple locations (local machine, specific folders on file and archive servers, etc.) all at once to find what I need. In 10.5 I've been unable to find a way to search more than one location at a time. Am I missing something, or has Apple removed the ability to search like this? This would be a serious roadblock for me as it would mean each search I do would have to be done 2-5 times, depending on what I'm looking for and where it could be found. I've even tried created a "search" folder which contains alias folders to all the places I'd normally search, but this didn't work.
    If anyone has any advice on how I could possible do this, it would be greatly appreciated!
    Regards,
    Kristin.

    Yea, I understand how to search in 10.5 (either using the magnify glass in top right, or command-F) but what I'm trying to figure out is how to search "This Mac" AND a folder on a server at the same time. In 10.4 you could just click on the places you wanted to search, but in 10.5 this option is gone. When you search "This Mac" (no matter how you customize your search), it only searches the Mac your on and mounted drives via USB and FireWire. It doesn't search other networked computers and servers and you have no option to search a specific folder on a networked computer or server unless you actually navigate to that folder and run the search (at which point you're only searching that folder and no longer also searching the "This Mac").
    You can customize a lot of things, but what feature that's lacking in the 10.5 searching is the ability to search specific/various locations across a network.
    In the studio it would be specific the computer I'm working on (a Mac Pro [not Macbook Pro]) and it's connected to 20 other Macs (G5 towers, Intel iMacs and Mac Pros) and two servers (Xserves). I only need to search specific locations on these systems, which you can't seem to do in 10.5. In fact, I haven't even found a way to search all the computers on the network, let alone specific locations on these computers on the network, all at once.
    I've been trying to figure this out all weekend (at home) via the following setup:
    - Intel iMac
    - External FireWire drive mounted on Intel iMac
    - G4 Server "connected" via Intel iMac
    In each of these locations I've placed the following folders:
    #1 - FIND THIS FILE - IMAC DESKTOP (on iMac desktop)
    #2 - FIND THIS FILE - FW HD (on external FW drive mounted to iMac)
    #3 - FIND THIS FILE - G4 DESKTOP (on G4 Server desktop connected to iMac)
    When I run the search, if I select "This Mac" it finds both folders #1 & #2, but NOT #3.
    The only way I can get the search to find #3 is to navigate via Finder to the G4 and run a search. But, now it's only searching the G4 Server and thus only find #3 and NOT #1 or #2.
    I can either search "This Mac" (and mounted drives) OR the G4 Server, but not both.
    At this point I have tried everything I can to get this to work, but nothing. I believe there is NO WAY to search various locations (especially various specific locations) across the network and that Apple has removed this ability in 10.5. I would LOVE if someone could prove me wrong!?
    Regards,
    Kristin.

  • Can't sync to more than one library at a time

    I have deauthorised my desktop running XP,installed latest version of iTunes on laptop running Vista and authorised. Connected iPod to laptop and tried to sync but keep getting message that "iPod is already synced to a library and cannot be synced to more than one library at a time." How do I get my library from desktop to laptop?

    *How do I get my library from desktop to laptop?*
    If our iPod is large enough to hold all of your iTunes it can be used as an external drive and you can move the iTunes folder from the old computer onto it and transfer everything to the new computer: How to use your iPod to move your music to a new computer
    Alternatively you can copy the contents of the iPod directly to the new computer. Connect your iPod to your new computer. When you get the message that it is linked to a different library and asking if you want to link to this one and replace all your songs etc, press "Cancel". Pressing "Erase and Sync" will irretrievably remove all the songs from your iPod. When your iPod appears in the iTunes source list change the update setting to manual, that will let you use our iPod without the risk of accidentally erasing it. Check the "manually manage music and videos" box in Summary then press the Apply button. Also when using most of the utilities listed below your iPod needs to be enabled for disc use, changing to manual update will do this by default: Managing content manually on iPod and iPhone
    Once you are safely connected there are a few things you can do to restore your iTunes from the iPod. If you have any iTunes Music Store purchases the transfer of purchased content from the iPod to authorised computers was introduced with iTunes 7. You'll find details in this article: Copying iTunes Store purchases from your iPod or iPhone to a computer
    The transfer of content from sources such as songs imported from CD is designed by default to be one way from iTunes to iPod. However there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. Have a look at the web pages and documentation, this is just a small selection of what's available, they are generally quite straightforward. You can read reviews and comparisons of some of them here:
    Wired News - Rescue Your Stranded Tunes
    Comparison of iPod managers
    TuneJack Windows Only (iPhone and iPod Touch compatible)
    iPod2PC Windows Only
    iDump Windows Only
    SharePod Windows Only
    iPodRip Mac & Windows
    YamiPod Mac and Windows
    Music Rescue Mac & Windows
    Floola Mac & Windows
    iGadget Mac & Windows (iPhone and iPod Touch compatible)
    iRepo Mac & Windows (iPhone and iPod Touch compatible)
    iPod Access Mac & Windows (iPhone and iPod Touch compatible)
    TouchCopy Mac & Windows (iPhone and iPod Touch compatible - Windows version only)
    There's also a manual method of copying songs from your iPod to a Mac or PC. The procedure is a bit involved and won't recover playlists but if you're interested it's available on page 2 at this link: Copying Content from your iPod to your Computer - The Definitive Guide
    Whichever of these retrieval methods you choose, keep your iPod in manual mode until you have reloaded your iTunes and you are happy with your playlists etc then it will be safe to return it auto-sync.

  • ITunes 8.1 Can't Seem to do More Than One Thing at a Time

    I upgraded to 8.1 and now, rather than a "faster" iTunes experience as was advertised on Apple's website, iTunes can't seem to do more than one thing at a time without locking up the application completely. For instance, when trying to download podcasts if I choose to hit more than one "Get" button at a time iTunes will freeze up until the first podcast has completely downloaded. During this time I cannot access any other screen in iTunes at all.
    This freezing of iTunes also occurred while I was trying to sync my iPhone 3G. I received the Calendar sync error that a few other people have mentioned on the forum and wanted to turn off Calendar sync (since I don't use it and don't understand why iTunes turned it on by default, apparently, after the upgrade) but I had to wait for my iPhone 3G to completely sync before I could gain access to any of the tabs in the iPhone sync window.
    So, basically it seems like the new version of iTunes (8.1) really doesn't like to be bothered while it is trying to copy data from one place to another.
    Any ideas?

    I'm using Vista Ultimate 64-bit and iTunes 8.1 installed OK, but required a restart of the entire OS after upgrading. It takes forever to launch, clicking on certain items (like applications) causes itunes to freeze for about 15-30 seconds before it continues (this is actually something that's been there since the introduction of the app store), I've had to switch my library view to LIST and avoid any sort of album art. Using album art to view my library causes iTunes to be extremely, obnoxiously unresponsive.
    The best part - plugging in my iPhone to sync it... iTunes simply sits there dumbly - doesn't even recognize that I've plugged my iPhone in. So now I can't even sync. QUALITY product, quality. So the app I'm FORCED to use to manage my phone doesn't even work after upgrading. Outstanding.
    I'm terrified of uninstalling and reinstalling... the last time I did that with iTunes it jacked my library up... it "lost" all of my music... basically it disassociated all of the music (even the stuff purchased through the itunes store) with the index file so I had to re-import EVERY song and delete the duplicate entry.
    I searched a ton of forums looking for any clues as to how I could improve performance... All I run into is apple fan boys flaming any and all forums to the point of PC *****, no Apple *****, and so forth. Extremely unhelpful.
    The fact is this - if I wasn't forced to use iTunes to manage my non-jailbroken iPhone 3G, then I'd dump it completely. It is a horrible app. Why punish the customers that haven't gone the route of "jail breaking" their iPhones?
    One individual on one of the forums suggested that blue screens, and all the other random errors, including slow performance were due to a lack of RAM. I have 4GB of RAM on my machine I can run a virtual Fedora core 9 machine and a virtual WinXP machine on my Vista x64 box and still not have any performance issues with those two virtuals in the background sucking up system resources, yet with nothing open and less than 50% of my 4GB of RAM in use iTunes performance is abysmal. I have not run into any other application on my Vista machine that performs as badly as iTunes.
    And Apple is touting a "64-bit" version of iTunes - it isn't. The applications the 64-bit installer installs are all 32-bit.
    So, I'm searching as the two of you are for an answer to horrible performance of iTunes.
    Even exiting out of iTunes takes a day and a half... "saving itunes library".... And my "library" isn't that big.

  • Is there a stereo bluetooth headset that can pair with more than one device at a time?

    Is there a stereo bluetooth headset that can pair, i.e. multipoint, with more than one device at a time?
    Are the MacBook and iPhone 4 capable of multipoint bluetooth technoloagy?
    The goal is for my wife to be able to watch her Korean TV soap operas on her MacBook and still receive a call on her iPhone 4 via a stereo bluetooth headset.
    I was looking at the Motorola S10-HD but after further review saw that it only pairs with one device at a time.
    Appreciate any and all input. My Googling has returned no results.
    Rick

    TeslasBB wrote:
    pairing my BB8330 with my blue tooth earphone(TM:jawbone) and my microsoft sync thats in my car simultaneously? if i pair with the car, will i have to pair my jawbone all over again?
    You can only pair one device at a time to your 8330, or any other phone for that matter.  The "pairings" are saved to the phone, you can use one or the other and you won't have to pair it again.  Once you turn your bluetooth device on and the phone is on, they will find each other again.
    Hope this helps,
    John
    Stevie Ray! 1954-1990
    ** Don't forget to resolve your post with the accepted solution.

  • App that can send more than one attachment at a time....

    Does anyone know of a app that I can send more than one attachment at a time like resumes + cover letters. Not having any luck with gmail or pages for the Ipad.
    Please help

    The MPEG Streamclip app can batch process videos. It can even convert up to  4 videos at the same time.
    http://www.squared5.com/
    It's free...
    Just drop as many videos as you like into the batch window.

  • How can I highlight more than one pic at a time?

    First of all, THANKS for anyone that may answer since APPLE obviously has no desire to get off their ***** and help their customers.
    About ten days ago I was prompted to install apples new operating system. So of course I clicked OK, idiot that I am!
    Now I'm stuck with this new piece of **** operating system that I wish I could uninstall.
    ANYWAY,
    I upload a lot of pix for stuff I sell on EBay, sometimes 3-400 at a time. When I delete photos it's usually 1,000 at a time, and I assure you I'm not exaggerating. Up until now I was able to touch the END pic and swipe the whole horizontal row with two fingertips and the whole row of 7 would get checked. With the new ios7 I am unable to do it anymore (yet ANOTHER reason I don't want this 'improved' OS).
    Does ANYONE know of a way to highlight more than one pic at a time?? Remember the old windows system where you could click one pic, then hit SHIFT and click a lower one and it would highlight them all, in between, for a quick delete?
    There MUST be a way to delete, or rather highlight (or CHECK) more than one pic at a time? Anyone?
    THANKS, Rich

    Yes, I know the photos stored on the device... But which app are you accessing the photos with? Which app do you want to be able to highlight more than one pic at a time in?
    There are literally thosands of apps that access the iOS Photo Library - which one(s) are you using?

  • How can I buy more than one item at a time?

    How can I buy more than one item at a time i iPhote fx a book and a calander? It would be nice to place one order and only pay for the shipping once!

    You can't.
    Regards
    TD

  • How do i get my ipod touch to download more than one app at a time, can i make it toware i dont have to wait for one app to download before it starts downloading another,

    my ipod will only download one app at a time and runs extremely slow. i was wondering if there is some way that i can make it download more than one app at a time and how can i make the app start downloading again after i have left my wi-fi zone and then went back in. im really confused.

    Download everything on your computer in iTunes, then sync your iPod to iTunes.
    You should be syncing (backing up) to iTunes and your photo app regurally, anyway.

Maybe you are looking for

  • BTSPORT Chaos makes BT 'SERVICE' An Even LESS Apt ...

    *** You have a new product I'VE known about since last year, yet because you can't support it WE, the LONGSTANDING, suffer!! So, I STARTED calling BT today at around 2pm...and here's how it has gone so far..... Call #1: After choosing various options

  • ERROR VNIC creation job failed

    Hello All, I have brought oracle VM X86 manager into ops center 12c control. When I try to create a new virtual machine it is throwing the 'ERROR VNIC creation job failed' error. Can anybody throw some light over this issue. Thanks in advance. Detail

  • Calendar - The server responded with an error.

    Since I updated to 10.10 I have a error en calendar every second, I try to read the discussion on the web, but no solution was found, Here is the error message I cannot remove this account from the calendar account (nothing happen) And this account i

  • What is "other" in the capacity bar and how do i manage it?

    What is "other" in the capacity bar and how do I manage it?

  • Oringinal ipad keeps crashing

    Safari crashes when I try to search or access the iTunes store I cannot purchase or update apps it crashes Many purchased apps now just crash I was trying to reload legacy apps that will work with of sys 5.1.1 and have come to a dead end. I own two i