Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
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.
It is sorta covered in the
JavaRanch Style Guide
subject: HELP!!!! how do i get image by extending Canvas object
Getting image using tomcat webserver
how to get Image from Canvas
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-2013