Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

Differences between getImage and createImage and using Toolkit

Thread view: 
Eitan M - 26 Jul 2006 20:45 GMT
Hello,
What are the differences between getImage and createImage,
and what if I want using toolKit - (getImage and createImage are static,
and I didn't find a way to create an Image object from a function of
toolkit).

I need a sample code, please.

Thanks :)
Thomas Fritsch - 26 Jul 2006 21:09 GMT
> What are the differences between getImage and createImage,
See http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Toolkit.html
The difference is that, getImage involves image caching and createImage does
not.
Cited from the API doc of Toolkit#getImage(String):
"The underlying toolkit attempts to resolve multiple requests with the same
filename to the same returned Image."
Cited from the API doc of Toolkit#createImage(String):
"The returned Image is a new object which will not be shared with any other
caller of this method or its getImage variant."

> and what if I want using toolKit - (getImage and createImage are static,
> and I didn't find a way to create an Image object from a function of
> toolkit).
You mean, these methods are *not* static, don't you?
Click "Use" at the top of the API doc of Toolkit. You find a list of methods
that return a Toolkit.

> I need a sample code, please.

Signature

"TFritsch$t-online:de".replace(':','.').replace('$','@')

Andrey Kuznetsov - 27 Jul 2006 07:33 GMT
> You mean, these methods are *not* static, don't you?
> Click "Use" at the top of the API doc of Toolkit. You find a list of
> methods that return a Toolkit.

e.g. Toolkit.getDefaultToolkit();

Andrey

Signature

http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.