Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Making a general Drawing class

$
0
0
I would like to make a general drawing class whose methods draw different shapes can be used from other classes. So for example if I am running an algorithm that draws points at specific spots then I could just import my drawing class and invoke a method like drawPoint(parameters here) in the algorithm. I only know how to make simple graphics in the paintComponent method but that does not help me because all the code for all shapes is lumped into the method and I can't be discriminant about what to draw at a particular time. I study physics, so I find myself running long algorithms, I would like to have a class where all the drawing code is done. I do not need code, but would like a strategy for accomplishing this task.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>