Login  Register

Re: question about adding component to a ImageWindow

Posted by xin zhang on Oct 07, 2008; 2:40pm
URL: http://imagej.273.s1.nabble.com/question-about-adding-component-to-a-ImageWindow-tp3694834p3694836.html

Hi, Patrick,

Thanks for the information, what I tried to put in the ImageWindow was
actually an object of ij.text.TextPanel.

So, any idea?

Xin

On Tue, Oct 7, 2008 at 3:27 AM, Patrick Pirrotte
<[hidden email]> wrote:

> Hi Xin,
>
> If you want to extend ImageWindow or ImageCanvas you need to stay in AWT.
> Try replacing JTextPane by java.awt.TextArea.
>
> You can't mix heavyweight components (such as AWT) with lightweight
> components (such as Swing). As ImageJ is written in AWT, inside Frames such
> as ImageWindow/ImageCanvas only AWT components get correctly drawn. You can
> put Swing components into a separate JFrame though, and several plugins do
> so to profit from the larger component library offered by javax.swing.*.
>
> Regards,
>
> Patrick
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of xin
> zhang
> Sent: 07 October 2008 00:03
> To: [hidden email]
> Subject: question about adding component to a ImageWindow
>
> Hi,
>
> I am trying to add a TextPanel to an ImageWindow, however, no matter how do
> I set the size of the TextPanel, I always get tiny TextPanel as shown at
> http://terpconnect.umd.edu/~zhangx/imagej/nanoscopeiiireader/Picture-2.png
>
> Has anybody any idea how to make the TextPanel take the whole width of the
> window?
>
> Thanks in advance.
>
> Xin
>
> --
> ***********************************************
> Xin Zhang
> Graduate Student
> Department of Materials Science and Engineering University of Maryland at
> College Park
> Tel: (301)405-0900
> Email: [hidden email], [hidden email]
> Web:http://www.glue.umd.edu/~zhangx/
> ***********************************************
>



--
***********************************************
Xin Zhang
Graduate Student
Department of Materials Science and Engineering
University of Maryland at College Park
Tel: (301)405-0900
Email: [hidden email], [hidden email]
Web:http://www.glue.umd.edu/~zhangx/
***********************************************