xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harm Cuppens" <harm.cupp...@iosint.be>
Subject RE: AW: question on JSVGCanvas
Date Thu, 13 Mar 2003 08:24:11 GMT
Hi Claire,
 
By looking at the Java documentation of JRootPane, you can use the method
setGlassPane where you can pass in a component you would like to act as the
glasspane.
If you look at the class Component, you can see that a Container is also a
Component, so you could do this: rootPane.setGlassPane( new JPanel() );
and then when you call getGlassPane, you can cast it to the JPanel: JPanel
glassPanel = (JPanel) rootPane.getGlassPane(); and then you can add you're
labels etc.
 
Hope this helps,
Harm

-----Original Message-----
From: Claire Wall [mailto:clazz_w@hotmail.com]
Sent: woensdag 12 maart 2003 22:38
To: batik-users@xml.apache.org
Subject: Re: AW: question on JSVGCanvas



how do we add JLabels to the glassPane?

As I understand it, the JRootPane object contains a component glassPane.
However the glassPane does not allow me to directly add a java component to
itself. The only add method it has takes a PopupMenu object as its parameter
and this is no good.

I know from your reply that it is  possible to add JLabels (or any component
for that matter) to the glassPane but as I have never used JRootPane before
can't seem to see how to do this.

Any help would be good.

Cheers

Claire


>From: "Lolling, Jan"
>Reply-To: "Batik Users"
>To: batik-users@xml.apache.org
>Subject: AW: question on JSVGCanvas
>Date: Tue, 11 Mar 2003 18:25:18 +0100
>
>A possible architecture could be:
>Use a JRootPane and add JSVGCanvas to the contentPane
>Add your labels to the glassPane und make shure that your glassPane is not
opaque.
>
>Be aware that JSVGCanvas resize his dimension if you load an SVG image zo
fit the image ins the whole size. You have to adapt your svg code to create
the correct image dimension.
>
>Jan
>
>
>-----Ursprungliche Nachricht-----
>Von: Claire WALL [mailto:K995363@atlas.kingston.ac.uk]
>Gesendet: Dienstag, 11. Marz 2003 18:15
>An: batik-users@xml.apache.org
>Betreff: question on JSVGCanvas
>
>
>Hi,
>
>I want to have a JPanel with an SVG image as the background.
>The JPanel will contain JLabels. How would I do this?
>
>Is it possible to add JLabels onto an JSVGCanvas? Or is there a
>way to set an SVG image as a background with JLabels on top?
>
>
>Claire
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: batik-users-help@xml.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: batik-users-help@xml.apache.org
>

  _____

Send instant messages for free with MSN Messenger. Click here to download it
now! ---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message