| Author |
Message |
|
|
not sure if this goes here... sorry if I misplace this.
Ok, I have a program we're writing in class... it is a brick-breaker game (you have a few rows of bricks, a paddle, and a ball that bounces around breaking the bricks).
There is a lot of stuff I have left to do on it, and only a short time left to work on it.
SO, I wanted to take it home.
When I put it on my computer at home though, everything compiles fine, and I get no errors when I run it... and yet, it only shows up as a white box like this:
Now, the Imports we're using are from a .zip file we were given called "acm"... To run the program in school, we had to go to "SETTINGS ------> PATH / CLASSPATH -------> WORKSPACE --------->CLASSPATHS (tab) -----------> NEW -----------------> BROWSE..." and then find the acm.zip file. Once we did that, it was good to go.
My teacher let me take everything related to the program home with me to work on here.
I did all the above, and I still get the blank applet (I'm using the EXACT same program from school, the EXACT same program thing to write the program [JGRASP] on the same version as at school, and I have the EXACT same items, files, etc... as at school).
Is there anything else I need to do to get this to work?
|
 |
|
|
what goes in the init(), start(), stop(), and destroy() methods?
what is the difference between and ?
lets say I have this simple code:
what, from this code, goes in the above mentioned methods to get this to run as an applet?
|
 |
|
|
not sure about this, but to me it looks like this:
if your investment has been in less than a year, it has no interest... so it returns your investment amount.
otherwise, it takes the interest rate, multiplies it by the investment, and gives you your investment amount with the interest rate.
the years -1, I don't know. I think that has something to do with the interest rate. maybe interest doesn't start until after the first year, so it subtracts a year.
just my interpretation, may very well be totally wrong.
|
 |
|
|
stdunbar wrote:Your app is very close - some different inheritance will be the key. Take a look at the applet tutorial for more details.
Thank you.
I've looked there multiple times as well as other tutorial/help sites.
They all say the same thing, and I try what they say... but I think I'm missing something.
I change the to
Other than that, I don't really know what the tutorials are saying.
I know that the init() method replaces the main, and it probably requires a start() , stop() , and destroy() ... but I don't know how to write those.
May you please help with that part?
many thanks.
|
 |
|
|
Ok, I have the following codes.
How do I make them into Applets so that I can put them on the Internet?
This makes a simple game (yes, VERY simple...still learning)
This is the Dice class needed in above program
I can compile and run all the code above in JGRASP, which is what I use.
|
 |
|
|
|
|