🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: (SORRY FOR MY BAD ENGLISH) Problem with a class that inherits from CANVAS

#8570
From: Ian Atkinson
Date: Tue, 08 Aug 2000 00:00
38 lines
2008 bytes
Marco - 

without seeing your code this is just a guess, what i believe is
happening is that the reason you only see the last object is because the
others are hidden under that one - you can either: 1) make the Pezzo
class transparent in places where the image is not or 2) modifiy pezzo
to manage multiple images in the same area and then just use one pezzo
object on the form.

ian

Marco Sindoni wrote:
> 
> Hello!!!Sorry for my bad english...
> My problem: I have a class,called "Pezzo".This class inherits from "Canvas"
> and
> implements "MouseListener" and "MouseMotionListener". This object paints an
> Image that can be dragged with left button. I want to place "n" objects
> "Pezzo" on a JFrame...
> I use: add(new Pezzo(...)), but on JFrame is displayed only the last object
> Pezzo:
> 
> Pezzo p1=new Pezzo();
> Pezzo p2=new Pezzo();
> Pezzo p3=new Pezzo();
> ...
> add(p1);
> add(p2);
> add(p3); /*-->On JFrame is displayed only p3*/
> 
> But I want to place "n" objects "Pezzo" on JFrame...I want to drag all
> objects ALL AROUND the screen...
> 
> I have used all Layout settings for JFrame, but nothing positive...Please
> help me!!!
> Bye, Marco...
> 
> (se c'� qualcuno che parla italiano � meglio...eh eh :))
Technical Details
Message-ID: <398FFA72.75E702F7@labs.mot.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8mom9j$opo$1@pegasus.tiscalinet.it>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 111d45,6a83300a81a5b522
X-Google-Attributes: gid111d45,public
From: Ian Atkinson <atkinson@labs.mot.com>
Subject: Re: (SORRY FOR MY BAD ENGLISH) Problem with a class that inherits from  CANVAS
Date: 2000/08/08
Message-ID: <398FFA72.75E702F7@labs.mot.com>
X-Deja-AN: 655815349
Content-Transfer-Encoding: 8bit
References: <8mom9j$opo$1@pegasus.tiscalinet.it>
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: postmaster@mot.com
X-Trace: schbbs.mot.com 965736848 26346 182.1.83.2 (8 Aug 2000 12:14:08 GMT)
Organization: Motorola
Mime-Version: 1.0
NNTP-Posting-Date: 8 Aug 2000 12:14:08 GMT
Newsgroups: borland.public.jbuilder.java.swing