For some reason the ball is still going off the top of the frame. Im not sure why.
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
Type: Posts; User: NathanWick
For some reason the ball is still going off the top of the frame. Im not sure why.
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
I am declaring the borderlessDimension before I declare the frame and set it Visible, let me try declaring it after
--- Update ---
Dude thanks so much! I feal like an idiot now haha
So im using the this.getContentPane().getSize(); to set a Dimension variable called borderlessSize (because its supposed to contain the size of the frame excluding the borders) and then im setting an...
I understand how to access the Width, Height, X, Y coordinates and everything, however how would I used those in order to test whether or not the two objects are colliding?
yeah but how would i do that?
I'm making a game where a ball bounces around the screen, and i was wondering how you would test if the ball (just a jlabel with an icon) collides with another square in the middle of the...
Thank you so much :D!
I made a game where basically, a ball (A JLabel with the icon set to a ball image from my computer) bounces across the screen, and when you click it, the speed increases. When I exported the game, it...