This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Image Filter problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Image Filter problems" Watch "Image Filter problems" New topic
Author

Image Filter problems

Terence Doyle
Ranch Hand

Joined: May 30, 2001
Posts: 328
HI,
I'm having trouble with displaying part of an image in an applet. This is the code I'm trying:
[code]
// Image2 is declared elsewhere
Image2 = getImage( getDocumentBase() , "palm1.jpg" ) ;
Image2.CropImageFilter(xpos-20, ypos -20, 40, 40 );
[end of code]
The error message I get is:
cannot resolve symbol
symbol : method CropImageFilter(int,int,int,int)
location : java.awt.Image
Image2.CropImageFilter(xpos-20, ypos -20, 40, 40 );
^
Any ideas??
Thanks,
Terry


Raising Flares debut album 'Ignition' out now

http://www.raisingflares.com

Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

CropImageFilter is not a method of the java.awt.Image class... it's a class in the java.awt.image package...

Here's an example program that shows how to use it... ( Replace "Washu.gif" with whatever image you are using... )



-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image Filter problems
 
Similar Threads
AWT Applet Instantiation Error
Instantiation Error in AWT Applet code
Using Graphics in a BorderLayout
placing images in applets
Circle collision Detection: Solved =)