What is the easiest way to draw 2D lines, boxes and circles in Java?
And I'm just doing stuff like fractals and simple animated flocking so I am not interested in a big game framework like LibGDX.
>>52034362
take a look at processing.org
Tailored for that imho.
Unless you need to make everything from scratch. Then take a look at https://docs.oracle.com/javase/tutorial/2d/
I don't want to sound like a dick but google your question.
visit #java on freenode.
>>52034362
>I don't want to sound like a dick but google your question.
When I do I get thousands of outdated and "do my homework for me" forum/blogspam.
>>52034362
Java has a built in 2D API with primitives.
>>52034856
https://docs.oracle.com/javase/8/docs/api/java/awt/Graphics2D.html
https://docs.oracle.com/javase/tutorial/2d/geometry/primitives.html
>>52034818
I get somewhat different results but most point to "use Java 2D Api". So that advice was unnecessary.
Try processing.org. It gives the same primitives (and much more) but helps avoiding a lot of the boilerplate code. It's also based on java.
>>52034899
https://processing.org/examples/
>>52034899
>>52034945
Thanks. Looks interesting.
>>52034818
which is why IRC exists. for programming and other tech questions.
>>52034362
Literally just make a class that extends JPanel and override the paint method on it. Easy peasy