Article View: borland.public.jbuilder.java.swing
Article #7604Could I have a SIMPLE image display please?
From: Jason Swett
Date: Sun, 07 Jan 2001 14:25
Date: Sun, 07 Jan 2001 14:25
16 lines
1768 bytes
1768 bytes
My goal is to show a student's picture in an application or applet. For now, I'd be happy with it in an application just to get the tiniest handle on how to display an image at all. I've read the "Working with Graphics" section of the Java tutorial (and lot's of other areas of the tutorial lately), but still am having difficulty. Sometimes the problem is trying to move the right parts of sample code at the tutorial into the JBuilder environment. Anyway, I have a picture file named "c:\176.jpg" on my Windows hard drive. I just wanted to display it on the main Frame of an application. For now, I don't want any extra containers, panels, etc. No buttons either. When the program starts, I just want it to display that picture, and that's all it needs to do. I assume you would use getImage and drawImage, but I need a much simpler example than what I've seen so far. Anyone care to oblige? Thanks.
Technical Details
Message-ID:
<3a587c79_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.online.be!fu-berlin.de!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!204.157.20.118Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,3d5e8a1122bfe253,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-07 06:37:09 PST From: "Jason Swett" <swettboy@ncats.net> Newsgroups: borland.public.jbuilder.java.swing Subject: Could I have a SIMPLE image display please? Date: Sun, 7 Jan 2001 09:25:20 -0500 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 204.157.20.118 Message-ID: <3a587c79_2@dnews> X-Trace: 7 Jan 2001 06:26:01 -0800, 204.157.20.118 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.online.be!fu-berlin.de!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!204.157.20.118