Using icons as Jbuttons, how does the ActionListener distinquish this

This may sound really simple, but I did search the forums, and also read up as much as I can find about the topic, but I haven't seen a solution.
I am creating a button out of an image. I've sucessfully (except for a small annoyance, that I am still working on), created this button and sized it to the exact size of the image that is the button. This button, which is an image, sits on a JPanel that has other buttons as well, which are just text. I have the ActionListener check which button is pressed using ActionEvent.getActionCommmand(). But the problem is, with the icon button, there is no text that is associated with it. I was thinking that perhaps I could set some sort of ID for the icon button, but I didn't see any method that let me set that. So how does one distinguish when an icon button has been pressed? Thanks in advance

This may sound really simple, but I did search the forums, and also read up as much as I can find about the topic, but I haven't seen a solution.The Swing tutorial is the best source of information:
http://java.sun.com/docs/books/tutorial/uiswing/components/button.html

Similar Messages

  • After recording text using the dragon dictation app, it is converted, it can be copied to the iOS system clipboard for use in any app, how does the user access the clipboard to retrive this information if it is no longer on the screen?

    after recording text using the Dragon dictation app, it can be copied to the iOS systme clipboard for use in any app, how does the user access the clipboard to retrive this information if it is no longer on the screen?

    You need to do a long-press in any data entry field, then select Paste.

  • OT: how does the site do this

    Hi
    At these sites: www.pageflakes.com and www.netvibes.com they
    are able to
    drag and drop sections of the screen around from one area to
    another. Does
    anyone know how they do this and have any pointers to
    tutorials or 3rd party
    components?
    Thanks
    Brendan
    Rate your experiences with your UK and Ireland builders at
    http://www.ratethebuilder.co.uk
    =========================================

    RateTheBuilder wrote:
    > Hi
    >
    > At these sites: www.pageflakes.com and www.netvibes.com
    they are able to
    > drag and drop sections of the screen around from one
    area to another. Does
    > anyone know how they do this and have any pointers to
    tutorials or 3rd party
    > components?
    >
    > Thanks
    >
    > Brendan
    >
    > ______________________________________________
    > Rate your experiences with your UK and Ireland builders
    at
    >
    http://www.ratethebuilder.co.uk
    > =========================================
    >
    >
    Google also does it. It's 'ajax', which just basically means
    complex javascript, integrated with
    some server-side programming.
    There is not one specific tutorial about how to do this
    particular effect, it's more something that
    you can start to grasp if you're a javascript expert and
    server-side language expert.
    You can Google 'ajax' and you'll get an idea of how this
    works in theory, as for practical ideas,
    you'll have to learn javascript.
    In Dreamweaver you can use some behavior that can sort point
    you to similar effects: using Layers
    you can use the 'Drag Layer' behavior, and set the layer to
    snap to a given position.
    That's a little bit of what is done with these sites, but
    they push it way beyond, with custom
    javascript functions of course.
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

  • How does the original iPad mini perform on iOS 8?

    I have been thinking about getting a new iPad from the iPad 2. I know the original iPad mini and the iPad 2 have similar specs, but the real upgrade I get from it is the wireless technology and the ability to use Handoff. Overall, how does the original iPad mini handle iOS 8? Should I go with that iPad or get the iPad mini 2? I wouldn't get the iPad mini 3 because I don't think Touch ID is necessary for what I want to do on an iPad.
    Overall, I am wondering how iOS 8 performs on the original iPad mini so it can help me choose between the original or the iPad mini 2. Thanks in advance for your input!

    Get the mini 2 when the prices come down. The mini 2 is baically a smaller iPad Air. The improvements over the mini are well worth the money.
    http://www.apple.com/ipad/compare/#comparison-chart

  • HT204406 how does the iTune icon present itself onto the dock. ?  And how does it play without being requested ?

    how does the iTune icon present itself onto the dock. ?
    And how does it play without being requested ?

    1. The SCB-68 is just a terminal block; it does not measure anything. The measurement is made on the board connected to the SCB-68.
    2. Computer-based data acquisistion devices and 480 V motors with solid state speed controls do not "play nice," as the kids say. The connections you are trying to make may well end up with a fried data acquisition board, fried computer, and MOST IMPORTANTLY a fried USER!
    Ground loop problems may produce noisy measurements or may destroy all the low current devices (like the computer) in the system.
    Signal conditioners are not only to reduce noise but also to provide safe isolation between the high voltage and high power parts of the system and the more sensitive parts.
    A thermocouple is a voltage generating device. The measurement system measures that voltage (typically millivolts) and independently measures the temperature of the "cold junction" of the thermocouple. The temperature at the hot junction of the thermocouple is calculated as Temperature(TC voltage difference) - Temperature(cold junction). If currents flow through the TC wires, due to ground potential differences between the motor frame and the computer ground for example, the voltage drop from Ohm's law is added to the TC voltage and will produce temperature errors. TC wire may have significantly higher resistance than wires used for most elelctrical signals so the interfering signal may be greater than the desired signal.
    Lynn

  • I have 12 core with Quatro 4000 and 5770, I want to use dual monitor setup, monitors are NEC with Spectraview-II.  How do I connect?  4000 only has 1 Display Port and 1 DVI.  5770 has 2 of each, if I use both 5770 Display Ports, does the 4000 contribute?

    I just bought a 12 core with Quatro 4000 and 5770, I want to use dual monitor setup, monitors are NEC with Spectraview-II.  How do I connect?  4000 only has 1 Display Port and 1 DVI.  5770 has 2 of each, if I use both 5770 Display Ports, does the 4000 contribute any work at all?  I read where on a PC they would work together, but on a MAC they do not.
    I read that Display Port has higher band width than DVI, NEC monitors for best performance they recommend using DIsplay Port.
    When I was setting this up I looked at a Nvidia Quadro 4000, unfortunately it was for PC, it had 2 Display Ports, in the Mac version they reduce it to one.  I did not think there could be a difference.
    Mainly want to use it for CS6 and LR4.
    How to proceed??? 
    I do not want to use the Quadro 4000 for both, that would not optimize both monitors, one DP and 1 DVI.  Using just the 5770 would work but I do not think the 4000 would be doing anything, and the 5770 has been replaced by the 5870.more bandwidth.
    Any ideas, I am a Mac newbie, have not ever tried a Mac Pro, just bought off ebay and now I have these problems.
    As a last resort I could sell both and get a 5870.  That would work, I'm sure of that, it's just that I wanted the better graphics card.
    Thanks,
    Bill

    The Hatter,
    I am a novice at Mac so I read all I can.  From what I understand the NEC monitors I bought require Display Port for their maximum performance.  The GTX 680 only has DVI outputs.  Difference from what I understand is larger bandwidth with the DP.
    You said I have the 4000 for CUDA.  I am not all that familiar with CUDA and when I do read about it I do not understand it. 
    A concern I have is, that if I connect the 2 high end NEC monitors via the 5770, using it's 2 Display Ports I would have nothing connected to the 4000.  Is the 4000 doing anything with nothing connected?  I read where in a PC system the 2 cards would interact but in a Mac system they do not.
    Bottom line, as I see it, the 4000 will not be useful at all to me, since I want a dual monitor set-up.
    So far the 5870 seems the best choice, higher band width than the 5770, and it has 2 Display Ports to optimize the NEC monitors.
    I'm not sure how fine I am splitting hairs, nor do I know how important those hairs are.  I am just trying to set up a really fast reliable system that will mainly be used for CS6 and LR4.  Those NEC monitors are supposed to be top notch.

  • How does the URL of DataSocket constitute?And how to use it in LabWindows/CVI ?

    Hi !
    There's a problem puzzled me some days.How does the URL of DataSocket constitute ? And how to use it in LabWindow/CVI ?
    For example.I have downloaded a code in http://zone.ni.com/devzone/cda/epd/p/id/3787.I want to make it work properly.So I configure my DataSocket Server Manger according to the URL of this statement.
    DS_Open ("dstp://weather.natinst.com/weather/current",
    DSConst_ReadAutoUpdate, DSCurrentCallback, NULL,
    &dsCurrentHandle);
     My DateSockket Server Manger is configured as:
    However,it could not work properly when I debug it.
    There's a introduction at the top of the code."You may need to replace the references to weather.natinst.com to 130.164.140.10 if the DNS isn't working properly."So,I modified the statement into
    DS_Open ("dstp://130.164.140.10/weather/current",
    DSConst_ReadAutoUpdate, DSCurrentCallback, NULL,
    &dsCurrentHandle);
    but,it did work properly.
    We want to communicate with other computers via the URL of  DataSocket in LabWindows/CVI.Whereas,how could we make it ia the URL ?
    If anyone could help me solve this problem,I would appreciate it very much !
    Best regards.
                     xiepei
    I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.

    Hi !
    Thank you very much for your reply! I will accept your advice.
    Besides,I have another question.If I want to visit other computers or other websites,how does the URL of DataSocket  I constitute ? Does the URL has any relation with the DataSocket Server Manger ?If does,how to configure the DataSocket Server Manager to let them connected.If they have no relation,how to use the DataSocket Server Manger ?
    After all,I want to know how to use it in LabWinows/CVI ?
    Thank you very much !
    Best regards!
    I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.

  • When and how does the message context get removed from the message when we use pass thru send port

    Friends,
    i have a doubt regarding message context.
    Assume i have used XMLRecieve pipeline in the receive side to receive the message so that the message context is created. I.e properties are promoted/written.
    now if we use pass thru transmit pipe line at send side, how and when does the message context get removed from the message?? Since pass thru does not have any stages/components, how does the message context removed and sent out a pure message to destination???
     i mean what exactly happens here to remove the context??
    Ravindar

    Thanks for the reply.
    "The Context is created by the Adapter, regardless of any Pipeline or Pipeline Component.  It has nothing to do with PassThrough vs. XmlReceive, although XmlReceive will write Promoted Properties to the existing Context,
    as can any other Component."
    yeah yeah, adapter does create some properties in context. You are right, i am aware of it. I just missed to explain it clearly. what i meant is addition of context properties will not happen if pass thru used. Thanks its clear.
    "No.  The Context already exists on the Message when it comes from the MessageBox and
    is equally available to any Component in any Stage.  The Context that hits the Pipeline is whatever was last Persisted, either by a Receive Port or Orchestration.  It is not created by the XmlAssembler (XmlTransmit)"
    You are right , the context already exists on the message while it leaves the receive port, and once it persists
    to message box the context and message context gets stored in messages in relative tables.
    Now as you said the components get the message from the last persistence, assume i have a send port(with passthru)
    subscriber and a orchestration subsrciber for this message.
    Orchestration gets the message with context right!!
    if the send sendport(with passthru) also gets message along with context, then where is this context removed/demoted
    while sending it out?.  i guess as per SAAkhlaq said,
    here sendport(with passthru) should get a pure message without context as passthru used. 
    or is it that ultimately send adapter removes the context completely?
    or is it something like biztalk run time load the context from database into cache and both orchestration and send port gets pure message, and if needed they use context from cache???
    sorry i may be troubling you, but i am confused. i hope i am not creating any nuisance with this
    post.
    Ravindar

  • How does the system identifies whether we use Psotive or Negative Time Mngt

    Dear All,
    How does the system identifies whether we use Psotive or Negative Time Management.
    Appreciate your early response.
    Regards
    Rajesh

    Hi
    1. In positive time management we record the actual time of the employee working in organization and following are the infotypes we need to maintain in master data,
              1. Organztion Assignement [0001]
              2. Personal Data [0002]
              3. Absence Quota [2006]
              4. Planed working time [0007] with the time management status " if you are using PDC then "2" " Or "1. Time evaluation actual time".
              5. Time Recording Info [0050]
    2. In Negative time management we are only recording the time deviation like "Absence, Illness, Leave" and following are the Infotype we need to maintain in master data,
             0001, 0002,0007 with time management status "0" i.e No time evaluation and 2006.
    Best of Luck
    Swapnil

  • How does the backup file that I would like to use for restore now require a password

    How does the backup file that I would like to use for restore now require a password, when I just Backed it up on 10/30/14

    It requires a password to restore from it because at some point, you checked the box in iTunes to use encrypted backups, at which point you were prompted for, and set a password.
    If you now can't remember what that was, then you can not restore from that backup.

  • UCCX 5/7 or 8 - Database access - How does the UCCX engine use the DB connection

    I was asked the following question by a customer:
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:Calibri;
    mso-fareast-theme-font:minor-latin;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    "How does UCCX manage it’s database connections – a connection pool manager / single connection / single connection for each call"
    Does anyone actually know ?  Is it documented anywhere?
    Based on how the steps work I'd guess that the UCCX engine makes a new single DB connection each time the DB step reaches out the DB for a read/write. I assume it would do this independently for every instance of a script running.  Hence the importance of the DB release step I'm guessing.
    I know in the DB subsystem you can configure the maximum number of DB connections to be used but this doesn't imply how they are used.
    I'm not a DB guy, but I think the concern stems from the potential load on a DB server with the constant opening and closing of the DB connections.  I'm assuming that if it used a connection pool the UCCX engine would open, and keep open, a group of DB connections to be used by the UCCX engine. This would lessen the load on the DB server I'm assuming.
    Is there any fundamental difference with UCCX 8 and the DB access ?  It obviously not ODBC anymore.  It JDBC right ? But again how does the UCCX engine use the DB connection?

    To my knowledge, this is not documented; however, at least through 7.0 the MIVR subsystem will open a pool of ODBC connections equal to the maximum you defined and keep them open. If you set it to 50, you will see 50 open connections on the SQL server. Each script that is triggered will attach to one of the available connections as soon as you use a DB-related step and keep it until you use a DB Release step. Once that script instance releases it, the connection is available for another script.
    The behavior should not change with 8.0 as it is the same MIVR subsystem that is doing the work. My first CCX 8.0 project that needs database integration is still about 30 days away so I can't guarantee that though.

  • New to using Firefox with MAC: How does one save a single jpeg image from the web (as in a right click on a pc?)

    New to using Firefox with MAC: How does one save a single jpeg from the internet, similar to using the right mouse click on a pc?

    If your question comes about because you have a single button mouse, it's time to visit your local computer store and get a ''real'' mouse for that MAC. I don't "get" Apple, they sell their hardware for almost twice what a comparable PC would sell for - and then they leave out what is probably the most important time saving control, the right-button.
    See this for setting the hidden pref for context menus in Firefox, for Mac's.
    http://kb.mozillazine.org/Ui.click_hold_context_menus
    type '''about:config''' in the URL bar and hit Enter
    Pref Name = '''ui.click_hold_context_menus'''
    Double-click to Toggle to '''True'''

  • Purchased ExportPDF for one of our end using depts.  It is under my account I manage for our institution.  How does the dept get the application to download.

    Purchased ExportPDF for one of our end using depts.  It is under my account I manage for our institution.  How does the dept get the application to download.

    Hi Cassi,
    If you are ordering subscriptions for various people in your office, it would be best to sign up under their Adobe IDs, so they can log in and use the subscription with their own credentials. As for moving the current subscription, the easiest route is to cancel the current subscription (see Cancel your membership or subscription | Acrobat, Acrobat.com online services--or I can help), and then reorder as necessary.
    Best,
    Sara

  • How does the predator AG3 used the 128 GB ssd and the 2TB hdd together

    I am contemplating buying a Predator AG3 from Costco.  It comes with 128b ssd and a 2tb Hdd.  How does the system use the two in combination?  Is the ssd only for booting?  Will Windows be on the SSD.  Will the system know to go to the HDD for programs not on the SSD?  I have no experience in using a system with two different type drives.

    SSD is normally used as OS installation and some heavy load programs (video - audio - image editing)HDD is used as data storage or to install big size programs (mostly games). System doesn't know where you want to install things so, it asks during installation example C:\Program Files\gamenameXYZyou can tell the installer to use the HDD instead of C: on SSD so you will change C to D (if your HDD has D: as system letter)D:\Program Files\gamenameXYZ

  • HT203071 How does the clients (iOS devices) to configure/use the caching server to download apps from local caching server instead of App store?

    Hi ... How does the clients (iOS devices) to configure/use the caching server to download apps from local caching server instead of App store?

    Hi,
    If you want to restore a reomoved app,you need to use
    Add-AppxPackage to add a signed app package (.appx) to a user account.
    But we cannot extract them from the ISO.
    The behavior is by design.And this is a software protection regime.
    Thanks for your understanding.
    Regards,
    Kelvin Xu
    TechNet Community Support

Maybe you are looking for