954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Paint interface

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

venomlash
Junior Poster
143 posts since Oct 2006
Reputation Points: 86
Solved Threads: 2
 

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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

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.

TheGathering
Junior Poster
102 posts since Jul 2007
Reputation Points: 22
Solved Threads: 10
 

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.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

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 .

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 
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.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

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

~s.o.s~
Failure as a human
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
 
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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You