🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Newbie : display a bmp

#8432
From: Carlos Ojea Castro
Date: Wed, 21 Mar 2001 10:22
44 lines
2024 bytes

Thank you, perhaps it would be better to use a gif instead...


Ronald Wildenberg wrote:

> 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: <3AB880D7.43B73785@rslcom.es>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!sunqbc.risq.qc.ca!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!213.250.128.151
References: <3AB71ECB.E0306BEE@rslcom.es> <3AB77760.A94BB95E@tryllian.com>

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:58:05 PST
Message-ID: <3AB880D7.43B73785@rslcom.es>
Date: Wed, 21 Mar 2001 11:22:15 +0100
From: Carlos Ojea Castro <ccastro@rslcom.es>
X-Mailer: Mozilla 4.74 [en] (WinNT; 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> <3AB77760.A94BB95E@tryllian.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 213.250.128.151
X-Trace: 21 Mar 2001 02:21:49 -0800, 213.250.128.151
Lines: 45
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!sunqbc.risq.qc.ca!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!213.250.128.151