Search:

Type: Posts; User: ZBixby

Search: Search took 0.10 seconds.

  1. Replies
    7
    Views
    1,303

    Re: Getting rid of Extra Dialog Boxes

    Ah see that makes sense. Well thank you, I tinkered with the code some more and found the solution, I had to create a setText within the if else statement. Corrected Code is below if you're...
  2. Replies
    7
    Views
    1,303

    Re: Getting rid of Extra Dialog Boxes

    I'm not quite sure which part of the code you want since I had posted all of it in my prior comments.

    When running the applet it displays and I enter the correct password to test it but instead of...
  3. Replies
    7
    Views
    1,303

    Re: Getting rid of Extra Dialog Boxes

    Well I just went in and tried



    public void actionPerformed(ActionEvent e) {
    String pass1 = input.getText();
    String passwords[] = {"Rosebud", "Redrum", "Jason", "Surrender", ...
  4. Replies
    7
    Views
    1,303

    Getting rid of Extra Dialog Boxes

    I'm currently working on some code for an applet and I have it up and working but am trying to get rid of the extra JOptionPane Message Dialogs and replace them with just a simple JLabel within the...
  5. Replies
    7
    Views
    1,223

    Re: Only uses Default Constructor

    Aggg this code is bugging me horribly. I might try starting I think the biggest problem I'm having trouble understanding is setting the yearsInvested; and moneyInvested; to private but then having to...
  6. Replies
    7
    Views
    1,223

    Re: Only uses Default Constructor

    I believe the problem I'm having for it only using the default constructor is that I can't pull the moneyInvested; and yearsInvested; because they are private classes:



    private double...
  7. Replies
    7
    Views
    1,223

    Re: Only uses Default Constructor

    Here is where I should be putting in my input for example I choose for "invest" 2000 however the code won't read that and is navigating back to the default constructor
    1786

    This is where I should...
  8. Replies
    7
    Views
    1,223

    Only uses Default Constructor

    My class is currently working on Looping; Characters, Strings, and the StringBuffer Assignment and I'm having a bit of an issue with my code as it will only use the default constructor. On top of...
  9. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    Yeah thanks for all the help!
  10. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    Huh.... well I have no idea what I changed but it suddenly started working right, I was going through trying to make sure the {} were right and I might have added one in that made it correct.
  11. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    I'm honestly not sure what you mean by this.

    --- Update ---

    I noticed in my assignment details that each of the methods must be separate from the main() method.
  12. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    Current code is as follows:



    //Program Name: Pet Advice
    //Author: Zane Bixby
    //Date: 09FEB13
    //Purpose: To recommend the type of pet a person should own.

    import javax.swing.JOptionPane;
  13. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    Maybe. I think the problem is in my final String command in that I don't know if it needs to be a String command. It won't go by the Switch; Cases commands as it will only return the first case...
  14. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    Not that I can see other then the already made .class file in my folder from compiling in JGrasp, this has really got me stumped.
  15. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    These are the results of attempting to run javac -Xlint

    C:\Program Files\Java\jdk1.7.0_11\bin>javac -Xlint "C:\Users\Zane\Documents\Peta
    dvice.java"

    C:\Program Files\Java\jdk1.7.0_11\bin>
  16. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    Oh sorry the -Xlint command.

    The biggest problem I'm having with this code is that it's not wanting to use the Switch Cases is it possible that my String Domicile; and String Hours; commands...
  17. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    When running it it returned no response in the command line does it output to a file somewhere?
  18. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    I don't think my javac.exe has -xlint, it keeps returning invalid switch. Agg this is frustrating i'm looking through the code and I can't figure out why the heck the switch;case is returning all the...
  19. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    Well that partially solved the issue. This code is all sorts of messed up I think because now if I try to return any value other then "A" it gives me my invalid entry error.

    Here's the code in...
  20. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    So I'm trying to change it to the equals() method but I'm receiving errors both ways I tried it. I think I'm a bit lost.



    PetAdvice.java:70: error: ')' expected
    if (Domicile equals("H");...
  21. Re: Application not running. "No main methods, applets, or MIDlets found in file."

    I'm using JGrasp to write and compile the program. I thought I had the main() method defined or do I have it set in the wrong spot.

    should the main() method be static as opposed to what I have...
  22. Application not running. "No main methods, applets, or MIDlets found in file."

    I'm currently working on an assignment for my Java class with the following instructions:

    Your application will consist of one class, PetAdvice.
    Use an input dialog box to request the type of...
Results 1 to 22 of 22