Needy person has a problem

Please HELP!
I'm trying to reset the monthlabel to the selected menuItem but i keep getting this ERROR
symbol : variable monthlabel
location: class calendarReminder
monthlabel.setText("January"); // verify that i is the correct index
^
1 error
If you can help as i'm banging my head of the walls.
Many,many Thanks Joe
String[] months ={"January","February","March","April","May","June",
"July","August","September","October","November","December"};
JLabel text, monthlabel;
// Second menu for months.
menu2 = new JMenu("Months of the Year");
menu2.setMnemonic(KeyEvent.VK_M);
menuBar.add(menu2);
// Group of months in JMenuItems
int m = 0;
for(int x = 0; x < 12 ; x++){
menuItem = new JMenuItem(months[m]);
menuItem.addActionListener(this);
menu2.add(menuItem);
++m;
JPanel month = new JPanel();
month.setLayout(new GridLayout(1,1));
monthlabel = new JLabel("", JLabel.CENTER); // **need to change label to current month
month.add(monthlabel);
public void actionPerformed(ActionEvent e) {
Toolkit.getDefaultToolkit().beep();
String actionstring = e.getActionCommand();
if (actionstring.equals("January")){
JOptionPane.showMessageDialog(this,"You selected " + e.getActionCommand() + " 2002"); // this works for an alert box
monthlabel.setText("January"); // but this is up the wall
thanks again

You don't show all your code, so this is a guess. Presumably the code before actionPerformed is inside another method that you don't show completely, so my guess is that this is a scope issue. Is monthlabel defined global to the class or is it inside another method?

Similar Messages

  • I can't be the only person who has this problem - when a month ends on a Saturday I can't drag events into the next month and instead have to cut and paste - a real pain in the butt. I thought there was something called "scroll" but I can't find that

    I can't be the only person who has this problem with iCal- when a month ends on a Saturday I can't drag events into the next month and instead have to cut and paste - a real pain in the butt. I thought there was something called "scroll" but I can't find that.

    Yeah that works, but, it involves a click on the event, a click on edit, a click on the date, keystrokes, plus, since you can't see the next month you have to have a calendar in front of you so as to put it to the right date. It's easier just to cut it and advance the month and paste it, once you are in the right month you can move it around helter skelter willy nilly no problems. Although now that you mention it I will try it, maybe it is easier than cut and paste as I don't really care about the date, as long as it gets moved into the right month I can drag it around all I want.

  • My new iPhone 4S has hearing problem.speaker and headphone works very good.However using handset to make and receive calls I cannot hear anything?I did restore the phone and removed the plastic.Is there any solution to this problem please?

    I am having heraing problem with iPhone 4S.Speaker and headphone works well.No echo.When I use handset to receive or make calls,I can't hear anything?I restore the phone and removed the plastic as well.Is there anyway to fix this problem?

    I personally haven't experienced much of the "reverberation/feedback" when using a headset on the i4S...
    Yes, I have near-perfect hearing too (for scope, squeaky brakes hurt my ears) I come from many conversations on many phones and types and first off, CDMA technology is great for coverage, terrible for voice quality. HD Voice in Europe made for some of the best phone conversations I've ever had.
    Back on track, feedback is most noticable (similar to the landline phone) when using the iPhone without a headset, but for me it's not an absolute criticality mainly because I use VoIP apps alot, so maybe it has desensitized me some over the past year.
    But whenever I'm on a call, and the other person has me on speakerphone, I have alot of trouble talking because of the feedback loop caused. So the less of my voice I hear the better I can talk.
    Have you tried a bluetooth headset yet?

  • I am in a group chat with like 7 other people who all have smartphones. 6 of the people have iPhones, but the other person has android. I'm wondering if the iMessage works for the other 6, and my text count is only being accounted for by the android.

    I am in a group chat with like 7 other people who all have smartphones. 6 of the people have iPhones, but the other person has android. I'm wondering if the iMessage works for the other 6, and my text count is only being accounted for by the android user. I have a monthly limit of 1000 text so I dont want to go over my plan by being in this group if the iMessage doesnt work because of that one android user.

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • I bought this ipad 4 in canada.and it has hardware problems.how will i return this ipad when im not anymore in canada?

    How will i return this ipad if im not anymore in canada?it has hardware problem.pls help

    Send it to a friend or relative in Canada to take to Apple for service,
    and then that person can send back to you when Apple is done. You
    are responsible for shipping and insurance.
    Apple does not accept international shipments for service nor will
    Apple ship out of the country after service.
    If there is an Apple store or Apple authorized service provider where
    you are, try them - but be prepared for them to refuse since the iPad
    was not sold at your location.

  • Hi, my friend. Has a problem psychologically Atabtna It is  Lost e-savior to change the security question has been the savior of new mail in order to put that I could answer the question of safety  But I did not activate the new Alamil hope to solve

    Hi, my friend.
    Has a problem psychologically Atabtna
    It is
    Lost e-savior to change the security question has been the savior of new mail in order to put that I could answer the question of safety
    But I did not activate the new Alamil hope to solve these are the problem

    Resolving this issue requires asking Apple to reset the security questions. To do so, click here and pick a method; if that page doesn't list one for the country or the person is unable to call, fill out and submit this form.
    (124711)

  • Iphone 4Gs battery life: 2nd phone has same problem

    I bought a 4gs last June (to replace a 4Gs that I lost) and the new phone's battery died after roughly 3 hours. Through my mobile provider I had it replaced, but also the new phone (so the second) has the same problem. The battery drains out within a few hours.
    I have bluetooth turned off, most locations services turned off, hotspot turned off, for most apps I have turned off push notifications, i have the automatich time zone turned off, etc. But even in the night, when not using it at all, it uses 20 to 40%!
    Any suggestions?

    Unfortunately, we are still not up to the technology of Star Trek. Batteries and mobile communications have come a long way in just a few years. Every person has the choice between using all the bells & whistles on their devices, or saving the batterry life for being able to use their phones in necessary instances.
    Here are some other suggestions:
    http://ipod.about.com/od/iphone3g/tp/iphone-battery-life.htm
    http://www.pcmag.com/article2/0,2817,2395808,00.asp
    http://www.imore.com/how-save-battery-life-your-iphone-and-ipad-tweaking-notific ation-center-settings
    http://osxdaily.com/2013/05/20/extend-iphone-battery-life-tips-that-work/

  • IPad mini personal hot spot problem

    Dear all,
    Few days ago I have get my self iPad mini 4G, I planned also to use it as a personal hotspot.
    Problem I have is that it won't share internet connection with other devices(iPhone4S and Apple TV), they are all connected to iPad hotspot but there is no data flow. iPad it self has internet and I have nice carrier data plan.
    Do anybody has idea what seams to be the problem?
    P.S. 1. When I erase APN settings other devices connect no problem but there is no internet than.
            2. When I enter APN carrier settings iPad has internet, other devices can see it as a hotspot but won't connect to it at all.
    Thanks!
    Ivan

    Hello there, Di666.
    A great place to start is this troubleshooting Knowledge Base article:
    iOS: Troubleshooting Personal Hotspot
    http://support.apple.com/kb/ts2756
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • IPhone 5S: does anybody has this problem. During a successful voice call all of a sudden people can't hear me while I can hear them

    iPhone 5S: does anybody has this problem. During a successful voice call all of a sudden people can't hear me while I can hear them. Signal is strong and call quality (me hearing the other) is still very good but it looks as if I’m going on mute while I’m not muting my iPhone. When dropping the call and re-dialing it works fine again. It’s a brand new iPhone 5S but it now happened already 4 or 5 times in 2 days.
    It feels like a hardware/iOS problem and not a network issue. It happend with iOS7.03 but I just see 7.0.4 is available so will install that one now.
    Thanks in advance for feedback
    Best regards,
    Marco

    Hello Jeff,
    Thank you for providing so much detail about the issue you are experiencing with the audio on your iPhone.  I would be concerned too if the audio on my iPhone was not working unless using speaker phone.  I found an article with some steps to take when you are experiencing issues like this:
    iPhone: Can't hear through the receiver or speaker
    http://support.apple.com/kb/TS1630
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Flash player does not work with new ICS Android 4.0.4 OS. Has this problem been addressed?

    Flash player does not work with new ICS Android 4.0.4 OS. Has this problem been addressed? I am using Firefox Beta for android and I also tried just Firefox.

    Please check the Play Store app for any Flash updates and install them if present.

  • I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't

    I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't use.  This month my daughter comes home from College and she accidentally uses 24G.....14 over get blind sided with $140.00 in overages.  I called Verizon today......stopped in to the store today......My neighbor told me they waved charges for her one time.  Lots of charges.....But I'm am getting no help.  Not even an offer of a payment plan to help me out.  I went back just 6 months and I have over paid for 19G.....Seems like they would like to help out their loyal customers!!!!     Does anybody have any suggestions on how to deal with them?   We are not wealthy....or I would just pay this and walk away......

    There is a big misconception in what customers believe a cell carrier is obligated to do.
    You pay a set price to use up to that amount of xx data. It makes no difference if you use it to the paid limit or way under. Its like peace of mind when you don't have to worry about a data counter.
    Your daughter used the data, your plan is quite clear of what overage charges are. Why should or would Verizon wireless just forgive the charges because you are a customer? Your daughter used the data, get the money from her. That is the responsible thing to do.
    There is no "I have been a loyal customer so please remove the $120, or $250, or $2,000.00 since I did not mean to use it"
    Your electric company, or gas company or any other company does not remove valid charges. Why should Verizon wireless?
    Just pay the invoice and don't think you are being mistreated because Verizon is a business and not a charity.
    Good Luck

  • Face time fades out and then tries to reconnect on new ipad retina display on WiFi.  Iphone 4s has no problem with face time from exact same location and same contact.  WiFi signal strong on both devices.  What gives?

    Face time fades out and then retries to connect (new Ipad Retina Display) on WiFi. Iphone 4s has no problem with face time from same location and same contact.  What gives?

    rdallas001 wrote:
    Is the router to small?
    Not necessarily, if you are using Facetime all the data goes through your WiFi router, your cable/DSL modem, your ISP and the internet to Apple's Facetime servers and then, in reverse, down to the Facetime recipient. If your ISP connection is too slow or there is excessive traffic on the internet you can have Facetime problems.
    Most WiFi routers can handle this unless others in the house are also using WiFi at the same time. The problem may be your ISP connection or congestion on the internet, etc.

  • Itunes in my laptop is not showing my iphone5 (7.0.4) but it has no problem wat so ever showing in another laptop...and my laptop has no prob showing other iphones

    itunes in my laptop is not showing my iphone5 (7.0.4) but it has no problem wat so ever showing in another laptop...and my laptop has no prob showing other iphones

    Hi siva samba,
    If you are having issues with your iPhone not being recognized in iTunes, you may find one of the following articles helpful:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    iOS: Device not recognized in iTunes for Mac OS X
    http://support.apple.com/kb/TS1591
    Regards,
    - Brenden

  • Since I updated to iCloud, Mail on my MacBookPro 10.6.8 has been unable to connect to MobileMe more than once or twice per day. Mail on my iPhone 4 has no problems. What's wrong?

    Since I updated to iCloud, (which may or may not be related) Mail on my MacBookPro 10.6.8 has been unable to connect to MobileMe more than once or twice per day. Mail on my iPhone 4 and my old iMac has no problems. When there is no service a yellow warning triangle appears adjacent to the Inbox and Connection Doctor reports,"Trying to log into this MobileMe IMAP account failed. Verify that username and password are correct."  Since it does fetch Mail from time to time they cannot be wrong.... can they? Should I update to 10.7 and if so what does that entail?

    You have been using MobileMe's email settings, which sometimes continue to work for a time after migration but then get turned off. iCloud's mail server settings are different. Strictly speaking Lion 10.7.2 is required for iCloud, and on that Mail is set up automatically.
    Snow Leopard cannot access most of iCloud's facilities, however you can set Mail up manually to access your email. The method is described here:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudmail.html
    The situation with iCloud and Snow Leopard is described in detail here:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudSL.html

  • With my i phone 4 , the Push notifications doesn't work for apps like (fb viber , whatsapp etc ) it only works for the official apps like message  even when im using the phone, has  this probleme with the iOs 6.0.1 and also with the iOs 6.1

    With my i phone 4 , the Push notifications doesn't work for apps like (fb viber , whatsapp etc ) it only works for the official apps like message  even when im using the phone, has  this probleme with the iOs 6.0.1 and also with the iOs 6.1

    This isn't an issue. Notice the screen prior to the one that shows usage has an iCloud section and a Manage Storage button. For this button to activate ios needs to download a few kb from icloud. Switching back to this screen forces ios to download those few kb.

Maybe you are looking for