944,077 Members | Top Members by Rank

View Poll Results: Do you know how to use interfaces in JAVA?
Yeah, of course. 4 57.14%
Uhhh...no. 2 28.57%
Interwhaaa??? 0 0%
I don't program in JAVA, I'm just browsing/lost in the website. 1 14.29%
Voters: 7. You may not vote on this poll

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1488
  • Java RSS
Jul 18th, 2007
0

Paint interface

Expand Post »
How does one use an interface? The paint interface in particular?
¡Ayúdame, por favor!
Similar Threads
Reputation Points: 86
Solved Threads: 2
Junior Poster
venomlash is offline Offline
143 posts
since Oct 2006
Jul 18th, 2007
0

Re: Paint interface

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Jul 18th, 2007
0

Re: Paint interface

http://java.sun.com/docs/books/tutor...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.
Reputation Points: 22
Solved Threads: 10
Junior Poster
TheGathering is offline Offline
102 posts
since Jul 2007
Jul 18th, 2007
0

Re: Paint interface

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.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007
Jul 18th, 2007
0

Re: Paint interface

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.
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,659 posts
since Dec 2004
Jul 18th, 2007
0

Re: Paint interface

Click to Expand / Collapse  Quote originally posted by peter_budo ...
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.
Last edited by Ezzaral; Jul 18th, 2007 at 1:57 pm.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007
Jul 18th, 2007
0

Re: Paint interface

The correct answer is 'Interwhaaa???'. ;-)
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Jul 18th, 2007
0

Re: Paint interface

Click to Expand / Collapse  Quote originally posted by peter_budo ...
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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Array Sorting on a User Supplied Element
Next Thread in Java Forum Timeline: How to generate a list of permutations for a given binary number





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC