Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » using a JPanel in an SWT application
using a JPanel in an SWT application [message #450593] Tue, 15 February 2005 19:43 Go to next message
Donna Gresh is currently offline Donna GreshFriend
Messages: 30
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 006C526F85256FA9_=
Content-Type: text/plain; charset="US-ASCII"

I have been building an SWT application for awhile now, and everything is
working fine. I recently decided to embed some functionality from a
toolkit built on swing. In particular, there is a "picture" object which
ultimately extends JPanel.

It seems like it should be possible to embed this object in a Composite,
but given the opposite way of "building" a gui between Swing and SWT
(parent.add(child) vs. child = new Composite(parent)) I can't quite figure
out how to do this.

Any help is appreciated.
Donna
--=_alternative 006C526F85256FA9_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">I have been building an SWT application
for awhile now, and everything is working fine. I recently decided to embed
some functionality from a toolkit built on swing. In particular, there
is a &quot;picture&quot; object which ultimately extends JPanel.</font>
<br>
<br><font size=2 face="sans-serif">It seems like it should be possible
to embed this object in a Composite, but given the opposite way of &quot;building&quot;
a gui between Swing and SWT (parent.add(child) vs. child = new Composite(parent))
I can't quite figure out how to do this. </font>
<br>
<br><font size=2 face="sans-serif">Any help is appreciated.</font>
<br><font size=2 face="sans-serif">Donna</font>
--=_alternative 006C526F85256FA9_=--
Re: using a JPanel in an SWT application [message #450644 is a reply to message #450593] Wed, 16 February 2005 14:06 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0076_01C51406.BBFDAA10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

This snippet embeds AWT/Swing in SWT. There are other snippets on the =
page that might help you too.

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org=
/eclipse/swt/snippets/Snippet135.java?rev=3DHEAD&content -type=3Dtext/vnd.=
viewcvs-markup
<gresh@us.ibm.com> wrote in message =
news:cutjcd$otp$1@www.eclipse.org...

I have been building an SWT application for awhile now, and everything =
is working fine. I recently decided to embed some functionality from a =
toolkit built on swing. In particular, there is a "picture" object which =
ultimately extends JPanel.=20

It seems like it should be possible to embed this object in a =
Composite, but given the opposite way of "building" a gui between Swing =
and SWT (parent.add(child) vs. child =3D new Composite(parent)) I can't =
quite figure out how to do this.=20

Any help is appreciated.=20
Donna
------=_NextPart_000_0076_01C51406.BBFDAA10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>This snippet embeds AWT/Swing in =
SWT.&nbsp; There=20
are other snippets on the page that might help you too.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D" http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets=
/src/org/eclipse/swt/snippets/Snippet135.java?rev=3DHEAD& ;amp;content-type=
=3Dtext/vnd.viewcvs-markup">http://dev.eclipse.org/viewcvs/index.cgi/org.=
eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet135 .java?rev=3DH=
EAD&amp;content-type=3Dtext/vnd.viewcvs-markup</A></FONT ></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>&lt;<A href=3D"mailto:gresh@us.ibm.com">gresh@us.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:cutjcd$otp$1@www.eclipse.org">news:cutjcd$otp$1@www.eclipse.=
org</A>...</DIV><BR><FONT=20
face=3Dsans-serif size=3D2>I have been building an SWT application for =
awhile now,=20
and everything is working fine. I recently decided to embed some =
functionality=20
from a toolkit built on swing. In particular, there is a "picture" =
object=20
which ultimately extends JPanel.</FONT> <BR><BR><FONT =
face=3Dsans-serif=20
size=3D2>It seems like it should be possible to embed this object in a =

Composite, but given the opposite way of "building" a gui between =
Swing and=20
SWT (parent.add(child) vs. child =3D new Composite(parent)) I can't =
quite figure=20
out how to do this. </FONT><BR><BR><FONT face=3Dsans-serif =
size=3D2>Any help is=20
appreciated.</FONT> <BR><FONT face=3Dsans-serif=20
size=3D2>Donna</FONT></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0076_01C51406.BBFDAA10--
Re: using a JPanel in an SWT application [message #450868 is a reply to message #450644] Fri, 18 February 2005 18:45 Go to previous message
Donna Gresh is currently offline Donna GreshFriend
Messages: 30
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 006705C985256FAC_=
Content-Type: text/plain; charset="US-ASCII"

Thank you!
--=_alternative 006705C985256FAC_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Thank you!</font>
--=_alternative 006705C985256FAC_=--
Previous Topic:TreeItem with checkbox
Next Topic:Starting a view out of an Action
Goto Forum:
  


Current Time: Thu Sep 24 12:09:52 GMT 2020

Powered by FUDForum. Page generated in 0.02167 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top