Skip to content
Advertisement

Tag: paint

What is the simplest way to draw in Java?

What is the simplest way to draw in Java? This doesn’t work and I have no idea how to get anything to appear. Answer Easiest way: You simply need to extend JPanel and override the paintComponent method of the panel. I’d like to reiterate that you should not be overriding the paint method. Here is a very minimalistic example that

Advertisement