How does one use an interface? The paint interface in particular?
¡Ayúdame, por favor!

there is no "paint" interface, at least not in any well architectured API.

Anyone who doesn't know what an interface is or how to use one should resort to some beginner's tutorial btw.

http://java.sun.com/docs/books/tutorial/java/concepts/interface.html

That is what an interface is. Usually to use an interface you need to find an implementing class of that interface in the java api and or write your own.

For example, to obtain an implementation for the Paint interface, you would use the .getPaint() method in the Graphics2D abstract class.

To find out how to use Graphics2D, you can Google the numerous Java GUI tutorials.

Actually Java does have a Paint interface in java.awt for defining color patterns, but I have never had a need to implement it in any Graphics2D work I've done to date. You would only need it if you were defining a customer color-type class.

One point for jwenting as there is no paint interface and one point for Ezzaral as there is Paint interface which can be found here.

One point for jwenting as there is no paint interface and one point for Ezzaral as there is Paint interface which can be found here.

hehe Ok, points for all.
The posted question is extremely vague though, so I doubt much help is forthcoming.

The correct answer is 'Interwhaaa???'. ;-)

One point for jwenting as there is no paint interface and one point for Ezzaral as there is Paint interface which can be found here.

which are of course 2 completely different things as classnames (and thus interface names) are casesensitive :)

I'm quite aware of the existence of a Paint interface.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.