Posts

Showing posts with the label graphics

I'm trying to work with Graphics and draw some Rectangles

Image
Clash Royale CLAN TAG #URR8PPP I'm trying to work with Graphics and draw some Rectangles Hello i'm trying to learn Graphics in java and at the same time Classes and Objects. My goal now is to make a programm that contains different classes with Rectangles or Circles and then I want to use those Rectangles and Circles in other classes and change their parameters like size, color and position to draw some kind of Pattern. My problem right now is that I can make a rectangle and I think I can even make a second one, but i can't change parameters of it (Color, size and position) I tried adding variables to this part of code Rect rect = new Rect(int variables); but it didn't work. Rect rect = new Rect(int variables); Normally I can solve easy problems like this but i really don't understand how classes and objects works in java if someone can give me some help would be great. Here is my code public class Main{ public static void main(String args ) { Pattern.d...