🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: jlabel canvas in applet?

#808
From: Tor Iver Wilhelmsen (TeamB)
Date: Thu, 15 Jul 2004 21:32
18 lines
1439 bytes
On Thu, 15 Jul 2004 15:05:08 -0400, joehahn  
<josephhahn@nospamhahnovations.com> wrote:

> Is there a way to get/set pixels for components?
> I want to get the pixels for some jlabels and set the pixels onto another
> jlabel or jpanel , save this as a stream and send it to my server app to
> create a image.

Use a BufferedImage's getGraphics() in combination with  
JLabel.paintComponent().

> I am using xylayout to move the jlabels to position on a panel.

Bad form, in many ways - try using a null layout instead.

-- 
Tor Iver Wilhelmsen
TeamB
Technical Details
Message-ID: <opsa67glu4z4mody@tiwilhel>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <40f6d3f9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,eaa523786bce5296
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: jlabel canvas in applet?
References: <40f6d3f9$1@newsgroups.borland.com>
Message-ID: <opsa67glu4z4mody@tiwilhel>
Date: Thu, 15 Jul 2004 23:32:35 +0200
From: "Tor Iver Wilhelmsen (TeamB)" <toriver@operamail.com>
Organization: TeamB
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
User-Agent: Opera M2/7.52 (Win32, build 3834)
NNTP-Posting-Host: 80.202.75.87
X-Trace: newsgroups.borland.com 1089926412 80.202.75.87 (15 Jul 2004 14:20:12 -0700)
Lines: 18
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail