Kevin Anderson

Greenhorn
+ Follow
since Jan 14, 2013
Kevin likes ...
Android IntelliJ IDE Netbeans IDE
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
6
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kevin Anderson

Ulf Dittmer wrote:Swing applets should override paintComponent, not paint http://docs.oracle.com/javase/tutorial/uiswing/painting/



It worked. Thank you.
10 years ago
Hello all,

I have the following program that, when the applet loads, all I get is a white screen with 4 textboxes. I have even tried commenting everything except for the background line out but it still wont draw the background. Could you please point me in the direction of the error?




Thank you.
11 years ago

Joe Ridener wrote:

Kevin Anderson wrote:Thank you for your responses. I am now at a build-able state and was able to create the .jar file. Now when I try loading the applet in IE, I get ClassNotFoundException password.jar.

https://www.dropbox.com/s/ugx7v57x9sphkgp/Untitled.png

I have made sure that the html file, .jar, .java, and .class files are in the same directory. Am I missing something?



One you do not need the class file. ClassNotFoundException is something I have gotten a few times. Not the best person to answer that. Though I work my way around it somehow each time I get it. Use the .jar file exclusively and discard the .class files. Things you might want to look for in your code may include unwanted references such as the package name if your editor adds it to the beginning of the ,java file. Though good practice. it will mess things up when you compile it into a class file. Check for logical errors that include referencing things that are not there.



I tried removing the package name and the error changed to java.lang.reflect.invocationtargetexception. Also, removing the other files did not work. Thanks though.
11 years ago
Sorry about that. Here is my code:



11 years ago
I have my .html, .class, java, and .jar files on dropbox:

https://www.dropbox.com/s/rrr48gaj9e3wlhs/Password.zip

This may help.

Thank you for everyone's help
11 years ago
Thank you for your responses. I am now at a build-able state and was able to create the .jar file. Now when I try loading the applet in IE, I get ClassNotFoundException password.jar.

https://www.dropbox.com/s/ugx7v57x9sphkgp/Untitled.png

I have made sure that the html file, .jar, .java, and .class files are in the same directory. Am I missing something?
11 years ago
Hello all,

I am trying to create an applet and have the following issues:

1. Not sure of the syntax to search for variable "password" in list "anArraylist"
2. Cannot get my applet to work

Here is my code for the applet:



and the html to load the applet:



Also, NetBeans wants me to add @Override before each of my methods. Is this correct?

Any help would be greatly appreciated.

Thanks,
Kevin
11 years ago
Ok, I figured out all but one of my issues. Now the below calculation keeps returning a zero:




AMOUNT is = 1000

I have to have cPercent as a int and sAmount as a double. Could the problem be with the conversion to a double?

This was so much easier in C#!

Thank you
11 years ago
Hello all,

I'm not 100% sure what is wrong with my code. I have to have the output below:



but am getting:

Commission on 50.0 at a rate of 5 is 50.0
Commission on 10000.0 at a rate of 5 is 10000.0
Commission on 75.0 at a rate of 7.5% is 75.0

Here is my code:



Could someone please help point me in the right direction? Thank you.
11 years ago