awt default toolkit
- From: "Michael G" <mike-g@xxxxxxxxxxx>
- Date: Wed, 22 Jun 2005 08:07:24 -0600
The following will not show the image nor will it throw any exceptions. Not
throwing exceptions doesn't surprise me because the documentation show that
it won't. That is a little surprising in itself. I am not using Swing
components.
public void paint(Graphics g){
String fileName = "dir/a.gif";
Toolkit toolkit = Toolkit.getDefaultToolkit();
Image img = toolkit.getImage(fileName);
// an awt panel's Graphics context doesnot show the image
g.drawImage(img, 0,0, null);
//this works fine
g.drawString("aString",50,50);
}
thanks, mike
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.
- Prev by Date: awt default toolkit
- Next by Date: awt default toolkit
- Previous by thread: awt default toolkit
- Next by thread: awt default toolkit
- Index(es):
Relevant Pages
|
|