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...
Type: Posts; User: ZBixby
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...
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...
Well I just went in and tried
public void actionPerformed(ActionEvent e) {
String pass1 = input.getText();
String passwords[] = {"Rosebud", "Redrum", "Jason", "Surrender", ...
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...
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...
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...
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...
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...
Yeah thanks for all the help!
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.
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.
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;
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...
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.
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>
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...
When running it it returned no response in the command line does it output to a file somewhere?
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...
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...
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");...
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...
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...