Help!, cant find method

Dear all,
I cant figure out what the problem is, if anyone has any clues I would be eternally grateful :P
//http://www.dickbaldwin.com/java/Java028.htm
//http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
//http://en.wiktionary.org/wiki/Wiktionary:English_inflection
//http://java.sun.com/developer/J2METechTips/2002/tt0131.html
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.io.*;
import javax.microedition.io.*;
public class HoroscopesMidlet2 extends MIDlet implements
CommandListener {
private Display display;
private Command exit;
private Command enter;
public TextField month;
public TextField day;
private Form form;
//star sign variables
int beginDay;
int beginMonth;
String name;
// returns horoscope name
public String getName() {  return name; }
public HoroscopesMidlet2(int bd, int bm, String nm) {
     //star sign variable assignments
     beginDay = bd;
beginMonth = bm;
name = nm;
//month = new TextField ("Month","",10,TextField.NUMERIC);
//day = new TextField ("Day","",10,TextField.NUMERIC);
form = new Form ("Horoscopes");
exit = new Command ("Exit", Command.CANCEL,2);
enter = new Command ("Enter", Command.OK,2);
public void startApp() {
display = Display.getDisplay(this);
form.append(month);
form.append(day);
form.addCommand(exit);
form.addCommand(enter);
form.setCommandListener(this);
display.setCurrent(form);
public void pauseApp() {
public void destroyApp(boolean unconditional) {
notifyDestroyed();
class Horoscope {
HoroscopesMidlet2[] signs;
public Horoscope() {
signs = new HoroscopesMidlet2[12];
signs[0] = new HoroscopesMidlet2(22, 12, "Capricorn");
signs[1] = new HoroscopesMidlet2(21, 1, "Aquarius");
signs[2] = new HoroscopesMidlet2(20, 2, "Pisces");
signs[3] = new HoroscopesMidlet2(21, 3, "Aries");
signs[4] = new HoroscopesMidlet2(21, 4, "Taurus");
signs[5] = new HoroscopesMidlet2(22, 5, "Gemini");
signs[6] = new HoroscopesMidlet2(22, 6, "Cancer");
signs[7] = new HoroscopesMidlet2(24, 7, "Leo");
signs[8] = new HoroscopesMidlet2(24, 8, "Virgo");
signs[9] = new HoroscopesMidlet2(24, 9, "Libra");
signs[10] = new HoroscopesMidlet2(24, 10, "Scorpio");
signs[11] = new HoroscopesMidlet2(23, 11, "Sagitarius");
HoroscopesMidlet2 findSign(int day, int mth) {
if (mth < 1 || mth > 12)
return null;
if (mth == 12) {
if (day >= signs[0].beginDay && day < 32)
return signs[0];
else
if (day > 31 || day < 1 )
return null;
else
return signs[11];
if (mth == 1) {
if (day >= signs[1].beginDay && day < 32)
return signs[1];
else
if (day > 31 || day < 1 )
return null;
else
return signs[0];
if (mth == 2) {
if (day >= signs[2].beginDay && day < 29 )
return signs[2];
else
if (day > 28 || day < 1 )
return null;
else
return signs[1];
if (mth == 3) {
if (day >= signs[3].beginDay && day < 32)
return signs[3];
else
if (day > 31 || day < 1 )
return null;
else
return signs[2];
if (mth == 4) {
if (day >= signs[4].beginDay && day < 31)
return signs[4];
else
if (day > 30 || day < 1 )
return null;
else
return signs[3];
if (mth == 5) {
if (day >= signs[5].beginDay && day < 32)
return signs[5];
else
if (day > 31 || day < 1 )
return null;
else
return signs[4];
if (mth == 6) {
if (day >= signs[6].beginDay && day < 31)
return signs[6];
else
if (day > 30 || day < 1 )
return null;
else
return signs[5];
if (mth == 7) {
if (day >= signs[7].beginDay && day < 32)
return signs[7];
else
if (day > 31 || day < 1 )
return null;
else
return signs[6];
if (mth == 8) {
if (day >= signs[8].beginDay && day < 32)
return signs[8];
else
if (day > 31 || day < 1 )
return null;
else
return signs[7];
if (mth == 9) {
if (day >= signs[9].beginDay && day < 31)
return signs[9];
else
if (day > 30 || day < 1 )
return null;
else
return signs[8];
if (mth == 10) {
if (day >= signs[10].beginDay && day < 32)
return signs[10];
else
if (day > 31 || day < 1 )
return null;
else
return signs[9];
if (mth == 11) {
if (day >= signs[11].beginDay && day < 31)
return signs[11];
else
if (day > 30 || day < 1)
return null;
else
return signs[10];
} else {
tryAgain();
return null;
public void tryAgain() {
Alert error = new Alert("Date Incorrect", "Please try again", null,
AlertType.ERROR);
error.setTimeout(Alert.FOREVER);
month.setString("");
day.setString("");
display.setCurrent(error, form);
public void commandAction(Command c, Displayable d) {
String label = c.getLabel();
if(label.equals("Exit")) {
destroyApp(true);
} else if (label.equals("Enter")) {
int mm = Integer.parseInt(month.getString());
int dd = Integer.parseInt(day.getString());
HoroscopesMidlet2 hscp = findSign(mm, dd);
}

int mm = Integer.parseInt(month.getString());
               int dd = Integer.parseInt(day.getString());Can you catch the NumberFormatException for this?
Can you print a stackTrace?
try{
     //problem code
}catch(Exception e){
     e.printStackTrace();
}

Similar Messages

  • Help cant find pictures!!

    i switched phone from iphone to galaxy and the girl at the store told me that all my pictures would by on icloud and now i cant find them... please someone help.. there are pics of my daughter i cant get back....

    It's possible you backed up your iPhone to iCloud.com but you can't view your pictures there and you can only "restore" your backup files via the iPhone that made it.

  • AriesATX-21-M06 Help cant find any website drivers for it

    Hello i have a AriesATX-21-m06 graphics card and i put it into my desktop and it still saying im using my default graphics card thats built in or something.
    i tried to look for aries ATX drivers and there is nothing on google i cant find 1 thing on this driver it just shows up
    device update spam websites and gives a virus.
    if anyone knows of there website and drivers to install please let me know

    Hello Jakeyup,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More. I understand that you are not able to utilize the graphics card you have recently added to your computer, and I would be happy to assist you! To begin, I will need to ask you a few questions:
    What is the Product and Model Number of your desktop computer?
    What version of Windows do you have installed on your computer?
    Has your computer completed all of its important Windows Updates?
    Have you completed all of your HP updates using the HP Support Assistant?
    Did you graphics card come with a software CD?
    What company manufacturer's your graphics card?
    Please re-post with the necessary information, this way I will be able to research this further for you. I look forward to your reply!
    Cheers!
    MechPilot
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks” for helping!

  • Cant find method? and i cant figure out how to round a decimal....

    when i compile this it says "getAverage not found in class AverageGradeUser" - look at actionPeformed() to find where its used at....how do i fix this, i had it working but somehow messed it up and when the new average is figured and put in the results textfield, how can u round it off to the nearest tenth (0.1)..ive tried using NumberFormat and related things but couldnt get it to work
    please help me
    thanks
    p.s. keep in mind i am a rookie-rookie-rookie in java programming
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class AverageGradeUser extends Applet implements ActionListener
    /****InstanceVariables****/
    public TextField input;
    /*****InitMethod****/
    public void init()
    Label directions = new Label("Enter a grade percent: ");
    input = new TextField(10);
    Label results = new Label("Your new average is: ");
    TextField output = new TextField(10);
    add(directions);
    add(input);
    add(results);
    add(output);
    output.setEditable(false);
    input.addActionListener(this);
    } // init()
    public void actionPerformed(ActionEvent e)
    double grade = Double.parseDouble(input.getText());
    if (e.getSource() == input)
    getAverage(grade);
    } // actionPerformed()
    } // AverageGradeUser class
    ============================================================
    (the classes are in separate files but both are in the project)
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class AverageGrade
    /****InstanceVariables****/
    private double total = 0;
    private double counter = 0;
    private double average = 0;
    private TextField input;
    private TextField output;
    /****ConstructorMethod****/
    public AverageGrade()
    /****AccessMethod****/
    public void getAverage(double g)
    total += g;
    counter ++;
    average = total / counter;
    output.setText(average + " " + getLetterGrade(average));
    input.setText("");
    } // getAverage()
    private String getLetterGrade(double avg)
    if (avg >= 90)
    return "A";
    else if (avg >= 80)
    return "B";
    else if (avg >= 70)
    return "C";
    else if (avg >= 60)
    return "D";
    else if (avg < 60)
    return "F";
    else
    return "error";
    } // getLetterGrade()
    } // AverageGrade class

    According to the code you have posted, method "getAverage()" is defined in class "AverageGrade" -- and not in class "AverageGradeUser". Therefore, you have two choices (in my opinion):
    1. Add the definition of method "getAverage()" to class "AverageGradeUser"
    2. Change the "actionPerformed()" method:
    Replace the line:
    getAverage(grade)with
    new AverageGrade().getAverage(grade)Hope this helps you.
    Good Luck,
    Avi.

  • Cant find Method in JSF1.2

    Hi all,
    i am Migrating an applicatoin (which i did not develop) from jsf1.1 to 1.2.
    There are calls on Methods which do not exist anymore. Can anyone tell me what to use instead of those call in JSF1.2?
    Here are the Method calls:
    Util.renderPassThruAttributes(writer, component, new String[] {"style", "border"});
    Util.renderBooleanPassThruAttributes(writer, component);
    //End of codeTanks alot in advance
    Alex
    Edited by: primedape on Jul 9, 2009 1:06 AM

    That's not part of JSF API.
    {noformat}It look like you're using com.sun.* or sun.* classes, which are not part of the public Sun API's (the java.* and javax.* stuff). You should NEVER do that. Those are "helper" classes which are undocumented and (heavily) subject to changes. Write your own "helper" classes.{noformat}

  • PLEASE HELP CANT FIND OUT!!!!!!!!!!!!!(ipod video)

    can i put stuff on my ipod from a different computer. Like i have one pc where i put all my music on. But i want to put dvds that i own on it to. So my other pc has a dvd drive. is there some way i can make this work?

    See if this helps;
    http://docs.info.apple.com/article.html?artnum=61675
    Cheers!
    -Bryan

  • Urgent Help Cant find an error in this statement and jdk is showing

    Error:
    Exception: [Microsoft][ODBC Microsoft Access Driver] Syntax error in CONSTRAINT clause.
    `````````````````H E L P```````````````
    s1.executeUpdate("Create Table " + n + " (Sno integer, Name varchar(20),So varchar(5),Source varchar(15), TTO integer, TTH integer, Status varchar(5), Rec varchar(15), DOJ Date, Type varchar(10), Sector varchar(15), Primary varchar(15), Proj varchar(15), Skills varchar(15), Level varchar(10), Band integer, Location varchar(15), Company varchar(20), Remarks varchar(50), Test date, IV date, Qualification varchar(15), RefSal float, RIF_NO integer, RIF_DATE Date, Target_Date Date, Lead_Time date, SLA_ACH Date, R1 date, R2 date, R3 date, R4 date,R5 date, R6 date, R7 date, R8 date, RR1 date,RR2 date, RR3 date, RR4 date,RR5 date, RR6 date, RR7 date, RR8 date)");
    I am using access as backend database on a remote machine.

    n is not a numeric data but is of string typeThat was just for your information because you didn't show any of your java code.
    Did you try changing the names of those columns? I haven't used access much, but i believe there is some workaround to using reserved words by putting square brackets aroundf them. I haven't done it, I just noticed the access gui front end does it sometimes. i found it much easier to just not use words I thought might be reserved.

  • Novice help - cant find compatible video fi

    Hi how does creative zen vision:m? video work can't get?anything on it that works???:angry:?

    Amazon seems to list a few.  Search on  1.8" hard drive
    I don't personally have any experience with these, and can't verify that they are compatible.  Your machine specs are here: ThinkPad Notebooks; 2005 to present (withdrawn models)
    Please verify compatibility yourself.
    Z.
    The large print: please read the Community Participation Rules before posting. Include as much information as possible: model, machine type, operating system, and a descriptive subject line. Do not include personal information: serial number, telephone number, email address, etc.  The fine print: I do not work for, nor do I speak for Lenovo. Unsolicited private messages will be ignored. ... GeezBlog
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Arrays - Can't find method

    Hi,
    can you help me with this error:
         import java.util.*;
         import java.lang.*;
         public class ArrayAsParameter
            static final int ARRAY_SIZE = 10;
            static Scanner console = new Scanner(System.in);
            public static void main (String[] args)
                int[] listA = new int[ARRAY_SIZE];
                int[] listB = new int[ARRAY_SIZE];
                System.out.print("List elements array: ");
                printArray(listA, listA.length);
                System.out.println();
                System.out.print("Enter integers: " + listA.length);
                fillArray(listA, listA.length);
                System.out.println();
       }I have error cant find method printArray, fillArray!
    This methods are in java.lang
    thx

         public static void printArray(int[] list, int noOfElements)
              int index;
              for(index = 0; index < noOfElements; index++)
                   System.out.print(list[index] + " ");
         }Found yesterday Thx
    AYMF

  • HT2534 i follow these steps.. but i cant find "None" option in the payment Method...

    cant find "None" option in the payement methods..please help..

    Did you follow the instructions on that page exactly when creating the account (the instructions won't work with existing accounts) ? I've just tried it and I get the 'none' option i.e. I logged out of my account and found a free app in the store and clicked on its free 'price' :
    And on the popup that you then get I clicked on 'create Apple id' :
    Which then gave me the 'none' option :

  • I backup to an external hdd with Time Machine, when it ran out of space it did not delete old backups, now my internal hdd says its full when before it had heaps of space. I have searched for extra files but cant find any. Can anyone help, please.

    I backup to an external hdd with Time Machine, when it ran out of space it did not delete old backups, now my internal hdd says its full when before it had heaps of space. I have searched for extra files but cant find any. Can anyone help, please.

    First, empty the Trash if you haven't already done so. Then reboot. That will temporarily free up some space.
    To locate large files, you can use Spotlight as described here. That method may not find large folders that contain a lot of small files.
    You can also use a tool such as OmniDiskSweeper (ODS) to explore your volume and find out what's taking up the space. You can delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Proceed further only if the problem hasn't been solved.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    Install ODS in the Applications folder as usual.
    Triple-click the line of text below to select it, then copy the selected text to the Clipboard (command-C):sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means.
    When you're done with ODS, quit it and also quit Terminal.

  • My ipod touch 4g isnt letting me download apps now whenever i try to it says cannot connect to itunes, i cant find anything that works, i logged out of my apple account and tried to log back in but it wont let me! Can anyone help me

    My ipod touch 4g isnt letting me download apps now whenever i try to it says cannot connect to itunes, i cant find anything that works, i logged out of my apple account and tried to log back in but it wont let me! Can anyone help me

    Likely Apple problem
    iTunes Store - 20% of users are affected
    Users are unable to make purchases.
    http://www.apple.com/support/systemstatus/

  • I was doing some thing on my mac and the normal link to the applications folder from the bottom right hand corner disappeared, I cant find it anywhere, Can you help me?

    I was doing some thing on my mac and the normal link to the applications folder from the bottom right hand corner disappeared, I cant find it anywhere, Can you help me?

    Simple process. If an iPhone go to the Apple Store and not Verizon
    the phone from Verizon will be a refurbished device and not new unless under the 14 day worry free guarantee
    good luck

  • I have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me

    i have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me???

    If Join was on then your home wi-fi must be set to Non-Broadcast.  If you did not set this up (maybe your provider did) then you will need to find the Network Name they used, and any password they used.  The SSID is Security Set ID and to see more try http://en.wikipedia.org/wiki/SSID .  Basically it is the name used to identify your router/network.  A lot of times the installer will leave it set as LinkSys, or Broadcom or whatever the manufacturer set it as for default.  Your best bet is to get whoever installed it to walk you through how they set it up, giving you id's and passwords so you can get in.  HOWEVER, if you are not comfortable with this (if you set security wrong, etc.) you would be well ahead of the game to hire a local computer tech (networking) to get this working for you.  You can also contact the vendor of your router and get help (if it is still in warranty), or at least get copies of the manuals as pdf files.  Sorry I can't give you more help, I hope this gives you an idea where to go from here to find more.

  • Hi! I need help, today I connected my mac Book Air to a tv for a presentation and as soon as I conected it the image on my screen went bigger. And I cant find the way to put it back as it was before. The Images are too big! heelp

    Hi! I need help, today I connected my mac Book Air to a tv for a presentation and as soon as I conected it the image on my screen went bigger. And I cant find the way to put it back as it was before. The Images are too big! heelp

    Morning DeeHutton,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at this article:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/ts2802
    Best of luck,
    Mario

Maybe you are looking for

  • Source2wsdd: ServiceGen does not contain a start method - help!

    Hello all Weblogic Users! I would greatly appreciate any help with this problem. I am getting this error when I do my build on Linux. [source2wsdd] source2wsdd: Doclet class weblogic.webservice.tools.ddgen.ServiceGen does not contain a start method.

  • Songs in iTunes showing as not on computer

    Why are some songs already in my iTunes library showing as not on my computer when I am looking at purchased items under my account?  If I download it from the cloud download icon, I end up having two copies of the same song.  Could it be the Apple m

  • AirPlay mirroring issue "No Device Detected" with MBP2011 and ATV2

    I upgraded my MBP (early 2011) to Mountain Lion.  I have an ATV2 (v4.2.1 software).  I am trying to AirPlay mirror from the MBP to the ATV but am getting a greyed out "No Device Detected" drop down.  Both MBP and ATV2 are on the same network. 

  • Delete and stay on the same page!!!!

    Hi guys, As elaborated in the following Picture: http://www.9m.com/upfiles/PlT97853.png I have a report and a form on the same page. When press delete I want to delete the checked boxes and refresh "DOWNLOAD" region or stay on the same page. NOTE: "T

  • Forms Modernization Webcast Recording Available

    In July I hosted a web conference on Forms Modernization and the 11g launch. The recording of the webcast is now live http://www.oracle.com/technology/products/forms/index.html http://download.oracle.com/otndocs/demos/modernizeforms/Seminar/UK_Semina