Very simple Q !! but not for me..

hello,
i know its a very simple Q for some people but i m not getting any solution to it...
the prob is that when i call ActionEvent by pressing two or more buttons the button that has produced the event is checked by using getActionCommand() but how can i check for two or more TextFields or TextAreas calling same ActionListener there is no getActionCommand() for TF n TA... i tried giving names to these components by using setName() n checking the components name in actionPerformed() but thats not working...
plz help me out... atleast this wud clear my basics....

Perhaps your use of setName() was not correct - it seems like it should work.
Another alternative is to provide the ability for your ActionListener to compare the object that is the source of the event to the TextFields.
Or, use a separate ActionListener.

Similar Messages

  • WHat I'm sure is a simple problem but not for me...

    Greetings all,
    I am putting together a simple applet that accesses a MYSQL database, reads all the records out and writes them to the "graphic" screen via the paint method.
    Everything works fine when I run the applet in a player (Eclipse) but when I move everything over to the web server, the html page (static part) displays but the applet fails with an error. The Java Console tells me the following:
    java.lang.NoClassDefFoundError: jdbctest01$Database
         at jdbctest01.init(jdbctest01.java:41)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    The applet code it is referencing is:
    40 ...
    41 db = new Database(url, user, pass);
    42 ...
    and the "Database" method being invoked is:
    public class Database {
    public Database(String url, String user, String pass){
         try{
    connection = DriverManager.getConnection(url, user, pass);
         catch(SQLException e) {
    As I said, nothing to it...but I can't figure out why its not working (but I am sure its obvious). I have tried it on IE & Firefox; same result. Both have java enabled, the class file and the html files all have open permissions (machine is not on the net) so I doubt anything as simple as security is at work. I have been staring at this for a while and I am losing feeling to my lower extremities. I hope someone out there can offer some ideas as to what I should be checking for or what else to do diagnostic wise.
    Many thanks,
    Pete

    Axel,
    Many thanks for the lead (Incidentally, it's not my code; they use it for "education" (of who I'm not sure) and they just discovered there are no compiled copies anywhere so, no examples, screen shots etc.). I "volunteered" to try and get it working and...
    Anyway, I added the jdbctest01$Database.class and I got "different" results. Now, it gets into the database class and when it executes the connection = DriverManager.getConnection(url, user, pass); it returns a SQLException error. I have confirmed that the url, user and pass values ARE correct so I am not sure where this error is coming from. The "connection" value is typed Connection. There really isn't anything else that I can see could be wrong. One other thing; the exception is caught in the Database instance but it still manages to return to the statement following the invocation of the Database class. The connection value it returns looks like it might be right (the returned value is: jdbctest01$Database@adb1d4 which I think is "like" it should be but no luck). The first statement on return is: stmt = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); and stmt is typed Statement) And at this point,it dies with a null pointer error.
    Any other ideas will be greatly appreciated.
    Thanks,
    Pete

  • I buy for mac app but not for the iPad, so how do I reinstall a program that has already purchased? I need help because I bought the imovie'11 but when he opened it only brought 8 movie trailer templates instead of the 15 it says on the program. How do I

    I buy for mac app but not for the iPad, so how do I reinstall a program that has already purchased? I need help because I bought the imovie'11 but when he opened it only brought 8 movie trailer templates instead of the 15 it says on the program. How do I solve this problem? Once paid for a program incomplete. I also liked that the AppStore itself had a button to reinstall programs already bought, because it is very hard to understand how to do this in the store, only option is to install and hide purchase, and how do I reinstall, attention'm talking about reinstalling a computer mac, not an ipad or iphone.
    Thank you.

    Prodesigntools.com , go ahead and download the software from there and use your serial number to serialize it.

  • ISync works for iCal but not for Address Book

    Another lost soul. Can anybody suggest where I should start looking for the problem.
    I've just successfully modified my iSync so that it sees my brand new Nokia 6300. I have got the phone and my iMac to sync my calendar, but absolutely zero activity on the contacts front.
    Looking at the message on my Nokia, the Synchronisation Info message records changes to the Calendar but makes no mention of the Contacts. It is as if I've switched off the requirement to sync these somewhere.
    Any ideas for where to look?
    Frances

    I followed the instructions on http://kaspers.freeflux.net/blog/archive/2007/04/13/how-to-isync-a-nokia-6300.ht ml , including simply replacing my MetaClasses.plist with his. The site blog shows this worked for lots of people, but not for me
    Over the years I have found these Apple Discussion lists a very useful source of help, but I don't think I have ever come across a list with so many frantic pleas for help as this! ISync is a wonderful Idea, but it seems that it is far from plain sailing to implement.

  • Transfer cost price from free of charge item to main item but not for VPRS

    Hi,
    I want to transfer cost price from free of charge item to main item but not for VPRS but for a new Z contidion type.
    For CO-PA proposes. Can you help me with This?
    Catarina Alves

    hi,
    transfer of cost from sub item to main item is configured in the delivery to billing copy control for the main item. go to VTFL  > select the required item cateogry > here at the bottom you will find a check box Cummulate cost. Tick it.
    Not really what you meant COPA purposes. But the pricing conditions are mapped to COPA value fields at KE4I transaction.
    regards
    sadhu kishore

  • My phone is not showing up in itunes.  I want to sync it.  I have a MAC and I have restarted the phone, it's charged, I have the most current version of itunes.  What do I do now?  It says to reinstall itunes if you have windows but not for mac.  Help!

    My phone is not showing up in itunes.  I want to sync it.  I have a MAC and I have restarted the phone, it's charged, I have the most current version of itunes.  What do I do now?  It says to reinstall itunes if you have windows but not for mac.  Help!

    With your phone plugged in, open Image Capture and see if the iPhone shows up.  If not, you are having a sync problem.  If it shows up in Image Capture, but not iTunes, I'd delete iTunes and reinstall it.

  • Unable to update apps since I have closed my Verizon e-mail account.  The old ID address pops up and I can not do updates.  I can not use the old password since the account is closed.  I have a new ID and password on my laptop but not for my I phone.

    My Verizon e-mail account is closed and I can not access the needed updates for my I phone apps.  Even if I knew the password I would have to access the old e-mail account which I can not do.  I have an ID and password for my new laptop but not for my I phone which is under a Verizon service contract....ugh!!!  Thanks

    kenfromsouth jordan wrote:
    My Verizon e-mail account is closed and I can not access the needed updates for my I phone apps.  Even if I knew the password I would have to access the old e-mail account which I can not do.
    You don't need to access the email account.
    Use the link provided by robdrage to update your old AppleID.

  • Airplay works for one user but not for another on the same machine

    I have the problem where airplay works for one user but not for another and both users are on the same machine.  For the user where it does not work, everything appears normal, it's just that there is no sound being transmitted.  I have tried restarting the Airport express, restarting iTunes, repairing disk permissions.  Any ideas about what can be done to resolve this?

    my /etc/group:
    root::0:root
    bin::1:root,bin,daemon
    daemon::2:root,bin,daemon
    sys::3:root,bin
    adm::4:root,daemon
    tty::5:
    disk::6:root
    lp::7:daemon
    mem::8:
    kmem::9:
    wheel::10:root,hans,ibm,gast
    ftp::11:
    mail::12:
    uucp:x:14:
    log::19:root
    locate:x:21:
    smmsp::25:
    http::33:
    games::50:
    network:x:90:
    video:x:91:
    audio::92:ibm,gast
    optical::93:hal
    floppy:x:94:hal
    storage:x:95:hal
    scanner:x:96:
    power:x:98:
    nobody::99:
    users::100:gast
    dbus:x:81:
    hans:x:1001:
    vboxusers:x:108:hans
    policykit:x:1002:
    hal:x:82:
    kvm:x:78:
    nx:x:85:nx
    avahi:x:84:
    camera:x:97:
    gdm:x:1003:
    gast:x:1004:

  • Table of Contents page numbers works for PDF but not for other formats

    Hi,
    I followed exactly was indicated here regarding creation of TOC.
    http://docs.oracle.com/cd/E10415_01/doc/bi.1013/e12187/T421739T481157.htm
    The page numbers generated correctly for PDF but not for RTF, HTML and XLS.
    (HTML and XLS are understandably not paginated in nature but why not in RTF?)
    Tried to make the simplest example work, with 2 headings each on a separate page. Doesn't work on either MSWord 2003 or 2007.
    What am I doing wrong?
    Regards,
    Jarell
    Edited by: Jarell on Jan 11, 2012 8:08 PM

    Hi Kavipriya,
    What is your email address? I have attached a file in Oracle Metalink, under SR 3-5172030861. named test_toc.rtf
    You may use any xml because the template does not use any dynamic binding of values.
    The template is basically 2 pages, the TOC in the 1st page. First TOC item (Heading 1) is in Page 1, and Second TOC item is in Page 2.
    So the end result should be (PDF result from BI Publisher):
    First TOC Item .................. 1
    Second TOC Item ............. 2
    But for RTF it outputs:
    First TOC Item .................. 0
    Second TOC Item ............. 0
    And after doing Print Preview (once or twice)
    First TOC Item .................. Error in Bookmark
    Second TOC Item ............. Error in Bookmark
    Hope this is detailed enough to illustrate the problem.
    Edited by: Jarell on Jan 17, 2012 10:24 PM

  • How do I set a specific page to open when I open a new tab in Firefox? I can open the page when initially opening Firefox, but not for subsequent tabs/pages.

    How do I set a specific page to open when I open a new tab in Firefox? I can open the page when initially opening Firefox, but not for subsequent tabs/pages.

    You can use an extension to set which page to open in a new tab:
    *NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    *My Homepage: https://addons.mozilla.org/firefox/addon/my-homepage/

  • How can I view the number of tunes in the Library? The number shows for Playlists but not for the total Library.

    How can I view the number of tunes in the Library? The number shows for Playlists but not for the total Library.

    Hello,
    I apologize for submitting this question.  Soon after I posted it I saw a similar question that had my answer..
    Again, my bad for not looking first.
    Ron Morris

  • Router works for desktop, but not for surrounding laptops.

    The router I have is the Linksys E1000. I bought it and hooked it up yesterday and works great for my desktop but not for my daughters laptop. Her laptop has wireless automatic internet recognitions which allows her to pick up surrounding internet networks. We cannot figure out how to make this work. Please help!

    Are you able to see your router's network  name on your laptop? If yes, then follow the below mentioned settings.
    Click Start >> Control Panel >> Network and Sharing Center >> Manage Wireless Networks, here remove all the networks present and close the Window...
    Click on Connect to a Network and try to re-connect to your Network, it should ask for your Network Key/Password, enter the correct password/network key and click Connect...
    It should connect...Once you are connected you should restart the computer, it should connect to Internet...

  • Linked server works for sa but not for user

    I have a linked server to an Oracle database. It works fine for me logged in as DBA but not for the user. The linked server uses the same account regardless of who's using it.
    When the user tries it the following error is thrown:
    Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server
    I have granted public access to MSDB and execute on the xp_prop_oledb_provider object to the user.

    this link should give all the connection string to sql server
    http://www.connectionstrings.com/sql-server/
    but can you verify if your application is really using that connection file ? try running trace alongside and try to connect to the database.. so do you atleast see  a call from this config file with username - myapplication??
    Hope it Helps!!

  • Just got a new MacMini.  Migrated files using Time Machine.  However, now, on Launchpad, I see several Firmware updates that were relevant for the old machine, but not for the new one.  How do I get rid of these updates?  They won't delete!

    Just got a new MacMini.  Migrated files using Time Machine.  However, now, on Launchpad, I see several Firmware updates that were relevant for the old machine, but not for the new one.  How do I get rid of these updates?  They won't delete!

    Only thing I can think of is trying this Lion trick...
    http://www.cultofmac.com/106030/how-to-nuke-lions-launchpad-and-start-over/10603 0/

  • My apple tv will not authenticate my nba league pass login--I am in the United States and the same login/pw works for my iPad, but not for apple tv.

    My NBA League Pass login cannot be authenticated -- I am in the United States and the same league pass name and password are working for my iPad, but not for my apple tv.

    I have this same issue and am becoming quite upset. NBA has absolutely no contact information to call and resolve this issue. I just spent $139.99 and cannot connect to Apple TV, while the same login works just fine on my iMac and iPad. When I signed up, the information provided indicated that I could view live games on Apple TV. What the ****?

  • Password works for login but not for the Adobe CC Desktop application

    Password works for login but not for the Adobe CC Desktop application

    Please refer to http://helpx.adobe.com/creative-cloud/kb/troubleshoot-cc-installation-download.html
    ou can try deleting OPM.DB from steps below and try again.
    Mac OS: You can locate the OPM.db file in the \User\\Library\Application Support\Adobe\OOBE folder. To access the hidden user Library folder, see Access hidden user library files | Mac OS 10.7 Lion. - http://helpx.adobe.com/x-productkb/global/access-hidden-user-library-f iles.html
    Windows: You can locate the OPM.db file in the :\Users\\AppData\Local\Adobe\OOBE folder.  To view the hidden AppData folder, see Show hidden files, folders, filename extensions | Windows XP, Vista, Windows 7. -http://helpx.adobe.com/x-productkb/global/show-hidden-files-folders-ex tensions.html
    3) update to the latest version of the Creative Cloud app.
    Also we would like few more details:
    When has this issue started occurring, was this after installation of any specific adobe product.
    On which platform are you seeing this.
    Also we would like to know if after above steps this issue occurs ever again in future.
    You can refer to http://forums.adobe.com/thread/1239510
    Regards,
    Rajshree

Maybe you are looking for

  • Attempting to install creative cloud update. fails with error code 87. Where do I find an unfinished install?

    I have received the error code 87 when attempting to update Creative Cloud. I had previously received an update for Acrobat Pro (not the CC version), and the install failed. Now I cannot install any Adobe product. How do I resolve this issue? Rather

  • Checking for business area while posting

    i have to check for business areas balancing during posting document eg., when we get interest income from a bank account under business area X it should be credited to an account with same business area X. Dr Bank - X Cr Interest income - Y this sho

  • Active Data Service DataUpdateManager is NULL

    Hello, I have two pages that make use of the ADF Active Data Service, and sporadically when one of the pages loads it abruptly refreshes itself and loads again. I haven't been able to reproduce this on demand, but when it happens its very distracting

  • Logo in PDF-Printlayout - Web / NW2004s

    Hi all, how can i implement a Logo in the PDF-Print in NW2004s. If i change the *_EXPORT Template by inserting a Logo the PDF Print still not includes it in the printing. Does someone know why? Regards, Adem

  • Click event on sub page menu makes my master page menu go away..???

    I've populated a menu using xml retrieved from a stored procedure and all is working great, except when I select an item from the sub menu and call a click event and it makes my main menu on my site.master go away and shifts the current aspx page up.