🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8422

Re: Newbie : display a bmp

#8422
From: Ronald Wildenberg
Date: Tue, 20 Mar 2001 15:29
37 lines
1753 bytes
Hi Carlos,

Loading bitmaps in Java is not officially supported. There is a way,
however and I advice you to read Java Tip 43 on JavaWorld:

http://www.javaworld.com/javaworld/javatips/jw-javatip43.html

Reading a bitmap looks very complicated to me, so good luck.

Ronald.

Carlos Ojea Castro wrote:

> Hello !! :
>
> Someone knows why this code don't work?.
> May I add another package ?
> Here is my code :
>
> import java.awt.*;
> class Principal
> {
>    public static void main(String arg[]) throws InterruptedException
>    {
>       Bitmap bmpTablero = new Bitmap("Tablero.bmp");
>       Graphics Tablero = bmpTablero.getGraphics();
>       Tablero.drawImage(bmpTablero, new Point(10, 10));
>    }
> }
>
> JBuilder says :
> 'class Bitmap not found in class Principal'
> 'method drawImage(<any>,java.awt.Point)not found in class
> java.awt.Graphics.
>
> Thanks,
> Carlos
Technical Details
Message-ID: <3AB77760.A94BB95E@tryllian.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.visi.com!hermes.visi.com!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!62.58.162.210
References: <3AB71ECB.E0306BEE@rslcom.es>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,def0e2b29bce1e8f
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-23 03:52:10 PST
Message-ID: <3AB77760.A94BB95E@tryllian.com>
Date: Tue, 20 Mar 2001 16:29:36 +0100
From: Ronald Wildenberg <ronald@tryllian.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Newbie : display a bmp
References: <3AB71ECB.E0306BEE@rslcom.es>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.58.162.210
X-Trace: 20 Mar 2001 07:28:01 -0800, 62.58.162.210
Lines: 38
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.visi.com!hermes.visi.com!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!62.58.162.210