My Next button is not working. Please Help!

Hello, everyone.
Thank you very much for stopping by my question.
I'm trying to make this work all day today. I'm out of idea...
SortedMap m = new TreeMap()is used to sort the collection.
I want to show next record(name and payrate) in the collection if there's any. Every time I try the code, I get 'Class Cast Exception'
What am I doing wrong? The following is the code.
<CODE>
// Next button
if (e.getSource().equals(nextBtn))
// Show an error message if the collection is empty.
if (m.isEmpty())
msg.setText("No Record is in the Collection");
//Instantiate an Inerator on the collection's key set and use it to
// display next record.
Iterator pointer = m.keySet().iterator();
if (pointer.hasNext())
msg.setText("The records: "+ (String)m.get(pointer.next()));
// Show a message if there is no more record available in the collection.
else {
msg.setText("No More Record");
</CODE>
Please give me suggestion/advice.
Thanks in advance.

hi, Radish21.
I think I'm not adding payRate into the collection succesfully.
I changed the code as below:
Iterator pointer = m.keySet().iterator();
if (pointer.hasNext()){
  Object key = pointer.next(); // get the next key.
  Object value = m.values(); // get the value for that key.
  msg.setText(key +"," +value);
}I got the following message in message area:
Eric,[project06.App$Employee[Eric,0,0,0x0,invalid,layout=java.awt.FlowLayout], project06.App$Employee[Maya,0,0,0x0,invalid,layout=java.awt.FlowLayout], project06.App$Employee[Naoyo,0,0,0x0,invalid,layout=java.awt.FlowLayout]]
I see the names I added, but don't see the payrate there.
The following is the code to add the name/payrate into the collection:
m.put(nameField.getText(),  new Employee (nameField.getText(), Double.parseDouble(payRateField.getText())));Isn't this adding payRate?
I'm sorry to ask you so many questions.
I do really appreciate your time and consideration.
Thank you

Similar Messages

  • I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

    I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

    I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

  • I have problem in iphone app. one,s i downloa in set next day is not working please help me what to do ? thanks

    Hi
    i download application from app store . but it showing icon but when i am pressing the icon it is not working and it showing down in runing program  . i deleting it
    again installing so for few days working and same thing is hapening again  please help me . what to do.
    thanks
    <Edited By Host>

    Welcome to the Apple Community.
    Try deleting the problematic app and then re-downloading the app from the app store.
    You can re-download content purchased from the app store using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in your iTunes application on your computer.
    You can re-download content purchased from the app store using the purchased option which is revealed by tapping the updates option at the bottom of the screen of the App store app on your iOS device.
    If the problem re-occurs, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History using your computer.
    I have asked for your email address to be edited out. Posting your address in an open thread is a sure way to be bombarded by unwanted email, remember it will be here long after you have resolved your problem, for automated detection software to find.
    If you want people to contact you, enable others to see your email address in your profile.

  • My iPhone won't charge and the sleep button does not work, Please Help!

    I woke up this morning and my iphone was dead. I have been using the assisted touch setting because one day for no particular reason my sleep button stopped working, so I can't even try a hard reset now.  The phone never had a bad drop and the only way it could be water damaged is from being in a steamy bathroom. If anyone has a suggestion as to how to get my phone to work again, Please leave a suggestion!!
    Thank you

    It could be that your button has justy gone out.  You may try getting compressed air to blow out any dust in there.  If that doesn't work, you may have to get your button and ribbon replaced.

  • Hp DV6 TouchPad Lock Button Not Working Please Help.?

    I just bought my hp dv6 6c4se entertainment notebook. but the touchpad on and off button is not working.please help.yes there is a little white sqaure in the left up corner of the touchpad.but it doesnt work.please help somebody

    Try a Hard Reset to gently "kick" that TouchPad back into operation.
    HP Notebook PCs - Use a Forced Reset to Resolve Hardware and Software Issues on Notebook with a Seal...
    Removable Battery:
    HP Notebook PCs - Use Hard Reset to Resolve Hardware and Software Issues
    Kind Regards,
    Dragon-Fur

  • HT4623 iOS 6.1 no longer available because you are no longer connected to the internet- this is what my iphone 4 shows. iv tried switching off again and again, closing apps by double tapping the home button but still not working. please help.

    this is what my iphone 4 shows. iv tried switching off again and again, closing apps by double tapping the home button but still not working. please help.
    is there any other method to download ios 6.1.2.
    my phone is not being recognized by itunes on my new windows 8. neither its working on touch copy.
    kindly help.
    thanks

    well in thatcase, i need another help .
    thanks for your instant reply.
    i have currently bought a new laptop (windows 8) and my iphone is not being recognized by itunes.
    because i have no backup on my previous laptop, i downloaded touchcopy but even touch copy is not recognizing my iphone.

  • My iphone 3g is not charging and the middle button has stoped working please help. My phone has no power now

    My iphone 3g is not charging and the middle button has stoped working please help. My phone has no power now an i need help

    For a broken home button you can find your options here http://www.apple.com/support/service/

  • HT1414 my handsfree is not working please help me

    Hi There!
    I am using Iphone 4s and ny handsfree in not working please help me

    Try restarting you iPhone by holding down the on/off and the home buttons at the same time until you see the Apple logo. 

  • The click at touchpad is not working, please help!!!

    I use Macpro, recently the click at touchpad is not working, please help!!! Thank you !!

    For this issue AppleCare support told me to so a SMC reset as follows:
    Power the machine OFF.
    At the SAME TIME hold down the following buttons:
    Shift
    Control
    Option
    Power
    Then release all buttons.  Power up the Macbook and see if the trackpad button work.
    Hope this helps.
    Bill

  • HT201412 my iphone 4s does not start by power switch, it starts when i connect to pc. the proximity sensor is not working. please help

    my iphone 4s does not start by power switch, it starts when i connect to pc. the proximity sensor is not working. please help.

    Sounds like it may be a hardware issue.
    Please contact Apple Support in your country.
    Here is a list of numbers: http://support.apple.com/kb/HE57
    Regards
    J

  • I have 4s iPhone , I download the iOS 7. Now the front receiver microphone is not working , please help me that how to fix the problem.

    I have 4s iPhone , I download the iOS 7. Now the front receiver microphone is not working , please help me that how to fix the problem.

    I live in South Africa, and I had the same problem with my iPhone 4.
    After weeks of frustration and swearing, I was in the process of restoring my phone to a previous iOS. To do that you need to turn the "Find my iPhone" option off, since i turned it off, my problem was solved. No need to repair anything or revert back to old iOS.
    ***** that i cant use Find my iPhone, but atleast i can use my phone.

  • I installed windows 7 on my macbook pro. all is working but lan adaptor and sound od laptop is not working. please help me or send the link where i can download the these drivers.

    I installed windows 7 on my macbook pro. all is working but lan adaptor and sound od laptop is not working. please help me or send the link where i can download the these drivers.I have lost my resource cd .

    If you are running Lion or Mountain Lion, the drivers are downloaded from within Bootcamp Assistant. If you are running Snow Leopard the drivers are on your Snow Leopard install disk.
    Read the Bootcamp Install Guide for your version of OSx. http://www.apple.com/support/bootcamp/
    Bootcamp questions should be asked in the Bootcamp forum where the Bootcamp gurus hang out https://discussions.apple.com/community/windows_software/boot_camp

  • While updating 4.0 version to 5 version system shows sim card is not valid. My iphone is not working .Please help me

    while updating 4.0 version to 5 version system shows sim card is not valid. My iphone is not working .Please help me

    I would imagine your iPhone was hacked to make it work on your local carrier.
    Updating the iOs to 5.xx will lock it back to the original carrier .The carrier holding the lock are the only
    entity able to authorise the unlock .You will have to contact them and see if they unlock and the terms the apply

  • HT201320 I have ne iphone 5, i been setting my email using AT&T global but it is not working, please help me on the correct configuration

    I have ne iphone 5, i been setting my email using AT&T global but it is not working, please help me on the correct configuration

    Contact the email provider and obtain the correct setup information.

  • The built-in mic in g50 122ca laptop model is not working. please help me out.

    the built-in mic in g50 122ca laptop model is not working. please help me out. OS: Windows Vista (32-bit)

    here is a sample code .
    so far you procedure looks good but
    i bet you have to specify the name of report , instead of 'filename'.
    see this
    Plist_id := GET_PARAMETER_LIST('P_name');
    IF NOT ID_NULL(Plist_id) THEN
    DESTROY_PARAMETER_LIST(Plist_id);
    END IF;
    Plist_id := CREATE_PARAMETER_LIST('P_name');
    ADD_PARAMETER( Plist_id, 'P_Receive_date', TEXT_PARAMETER, TO_CHAR(Receive_date,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Hearing_date', TEXT_PARAMETER, TO_CHAR(Hearing_date,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Hearing_time', TEXT_PARAMETER, TO_CHAR(Hearing_time,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Issue_date', TEXT_PARAMETER, TO_CHAR(Issue_date,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Workshop_date', TEXT_PARAMETER, TO_CHAR(Workshop_date,'mm/dd/yyyy'));
    -- RUN_PRODCT(REPORTS,'..\Reports\Pro_License',SYNCHRONOUS, RUNTIME, FILESYSTEM, Plist_id, NULL);
    -- here Pro_License is the name of report.
    did you tried to see if the parameter passed using a message ?
    try
    message('parameter name'); pause; write this before "run_report".

  • My itnues for pc is not working :( it shows that iTunes has stop working,I have downloaded Itnues many times but still it is not working, please help me

    my itnues for pc is not working it shows that iTunes has stop working,I have downloaded Itnues many times but still it is not working, please help me

    Please helppppp

Maybe you are looking for

  • I do not have a credit card to purchase in the itunes store.  I do have an itunes gift certificate.  How can I use this card when I do not have a credit card?

    I do not have a credit card to get through to the itunes store.  I do have an itunes gift certificate.  How do I use this if I cannot get through the ID part to redeem my gift card? Thanks

  • Embedded spaces in words

    I am using Adobe Reader Version 9.4.5.  When I select, copy and paste certain content from a pdf file into another tool, say MSWord, Outlook, or even into Adobe Reader's seach box, the words sometimes include embedded spaces.  For example, the word "

  • XML newbie question - xml into arrays

    I am pretty new xml and I am working with a file that has text associated with images in the file and I would like to move the text into a xml document. I heard that a good way to deal with xml is to load it into an array. I have my text set up in ar

  • Factory settings for MacBook Air

    Hi, I have added a user in user&groups and have been strugling for few days with the settings. Since there are no data on the MacBook Air I need, I am ready to just re-install the whole laptop. The Apple helpdesk advised me to do it. But after I rest

  • Vendor Approval & Selection

    hi pl tell  mehowto configure below given requriment The QM component monitors the release of supply relationships in stages. You can define certain statuses such as model series, preliminary series, and production series through which the deliveries