I must have missed that, sorry. Anyway, neither of these work and I either get a working applet but with black screen without any ships on it, or it crashes and I need to kill its process to be able...
Type: Posts; User: macko939
I must have missed that, sorry. Anyway, neither of these work and I either get a working applet but with black screen without any ships on it, or it crashes and I need to kill its process to be able...
I didn't post anything new in my last post, all the code was copied from the first one.
Anyway, even if I put all the "on click" events in comments, the applet still doesn't draw these ships for...
I'm sorry mate but I have no idea what did you just said.
@GregBrannon
I am talking about the "FleetOfShips" class all the time here. That is the only one I got problem with.
I dont know...
Basically I got 3 classes.
The first one is to draw an orange square on a black background that reacts to user actions (mouse clicks)
The second one is a bunch of these squares drawn together...
Okay so I use code the same as "AnimateInTabSquare" to make my fleet appear in the applet (to actually make it visible) but, unlike with my other classes, the applet window is white, doesn't show any...
Okay, so programming was never my strong side, but I have to get it done for next tuesday.
So the idea behind my program is:
There is a class for drawing a square, then there is the ship class...
Thanks man, I managed to make it work, i wouldn't be able to do it without your help. Really, thanks <3
Sorry man I am really new to java, we started it recently in school and I am not the best at it. Sorry for all the problems.
I decided to start over because my previous project was a massive mess,...
It shows just a single fleet of the squares (5 squares) in a shape defined in the "Ship" class and it doesn't move when I click it.
I got UML as an example of how to do it that I can paste here...
Hi guys I wasted my entire day today trying to figure out and I just can't. I lost all my hope.
Square:
package assignment1;
import java.awt.*;
public class Square