File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
HELP!!!! how do i get image by extending Canvas object
Joined: Feb 12, 2002
Feb 21, 2002 20:30:00
i have this code i've extended the canvas object, basically i'm coding my own button by using canvas but how do i get image from a file
The Code is the Programmer
Joined: Jan 09, 2001
Feb 23, 2002 13:05:00
Image im = Toolkit.getDefaultToolkit().getImage( "C:\\TEMP\file.gif" );
Roy Ben Ami
Joined: Jan 13, 2002
Feb 23, 2002 14:38:00
also, since you are using canvas i guess you are using AWT and not swing.
if u ecide to switch to swing then u can use the class called
. only needs a filename in its constructor.
I agree. Here's the link:
subject: HELP!!!! how do i get image by extending Canvas object
how to get Image from Canvas
Getting image using tomcat webserver
Displaying a png on screen using AWT
Image from Canvas
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014