🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1123

[JbX read image] trouble with reading image file

#1123
From: Raydog
Date: Fri, 09 Apr 2004 19:22
27 lines
1628 bytes
hi , i am trying to read in a png image with the following code:

public class BK extends JPanel {
     BufferedImage image;
     int w,h;

     public BK() {
         try {
             image = ImageIO.read(new File("bk.png"));
             w = image.getWidth();
             h = image.getHeight();
         } catch (IOException ioe) {
             System.out.println(ioe);
             System.exit(0);
         }
     }
==========================
this code works fine when i use JCreator 3,
but the exact code when i try to build&run under JBuilderX it always gives
exception
"cannot read file"

I have been stuck with this for a while, i hope someone could give me some
hint.

THanks so muchm
raydog
Technical Details
Message-ID: <4076f7e8@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,424df1da00210b82,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-04-09 12:39:53 PST
From: "Raydog" <sanyozr@hotmail.com>
Newsgroups: borland.public.jbuilder.java.swing
Subject: [JbX read image] trouble with reading image file
Date: Fri, 9 Apr 2004 12:22:07 -0700
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 207.6.247.213
Message-ID: <4076f7e8@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1081538536 207.6.247.213 (9 Apr 2004 12:22:16 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail