🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Send help: JBuilder 9: display .jpg file with JBuilder using components.

#1260
From: Melanie Miller
Date: Tue, 02 Mar 2004 20:51
24 lines
1865 bytes
--------------------------------------------------------------------------
      Hi there,
      I'm new to JBuilder 9 and have had school experience with using JAVA.

      I am trying to display a .jpg file.

      I already have loaded it with:
      -------------------------
      Image image = null;
      // Read from a file
      File file = new File("C:\\FILES\\martian_girlfriend.jpg");
      image = ImageIO.read(file);
      -------------------------- 

      How do I now display the loaded image? I already have gotten it to
work
      and load in a separate frame, but I am looking to load it into another
      SWING component like JScollPane or other. This might not be possible
      since I'm such a Newbie and do not know the full power of Swing.

      So please send help.
      Thanks,
      Melanie.
Technical Details
Message-ID: <4044f413$1@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,5a2f575c0d58ef1d,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-03-02 13:11:01 PST
Reply-To: "Melanie Miller" <melanie.e.miller@lmco.com>
From: "Melanie Miller" <melanie.e.miller@lmco.com>
Newsgroups: borland.public.jbuilder.java.swing
Subject: Send help: JBuilder 9: display .jpg file with JBuilder using components.
Date: Tue, 2 Mar 2004 15:51:23 -0500
Lines: 28
Organization: Self
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: 192.91.147.194
Message-ID: <4044f413$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1078260755 192.91.147.194 (2 Mar 2004 12:52:35 -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