Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Is there a component like JTextPane in SWING?
Is there a component like JTextPane in SWING? [message #462208] Sat, 08 October 2005 02:21 Go to next message
Sean is currently offline SeanFriend
Messages: 20
Registered: July 2009
Junior Member
Hi
is there a componenet like that? I mean that the componenet not only can
contain text but also can contain pictures and even play sounds?
Re: Is there a component like JTextPane in SWING? [message #462221 is a reply to message #462208] Sat, 08 October 2005 12:38 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
The only way you can really do this is to make a custom extension of Canvas. Or, if you prefer overriding and nullifying functionality to writing your own, you could extend StyledText. If you just want to display flat text, you can use a Text widget with an SWT.WRAP | SWT.BORDER | SWT.MULTI style. It all depends on what you actually need.
Re: Is there a component like JTextPane in SWING? [message #462337 is a reply to message #462221] Mon, 10 October 2005 22:11 Go to previous messageGo to next message
Grzegorz Zieliñski is currently offline Grzegorz ZieliñskiFriend
Messages: 41
Registered: July 2009
Member
Hello Daniel,

> The only way you can really do this is to make a custom extension of
> Canvas. Or, if you prefer overriding and nullifying functionality to
> writing your own, you could extend StyledText. If you just want to
> display flat text, you can use a Text widget with an SWT.WRAP |
> SWT.BORDER | SWT.MULTI style. It all depends on what you actually
> need.
>

You can also wrap Swing's JTextPane and create SWT widget...
Not beautiful solution, but works...

Grzegorz Zieliński
g_zielinski<at>intechion.pl
Re: Is there a component like JTextPane in SWING? [message #462338 is a reply to message #462337] Tue, 11 October 2005 01:39 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Grzegorz Zielic5
Re: Is there a component like JTextPane in SWING? [message #462340 is a reply to message #462338] Mon, 10 October 2005 23:50 Go to previous message
Sean is currently offline SeanFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,thanks all.

"Haris Peco" <snpe@snpe.co.yu> д
Previous Topic:Buttons with colors on it
Next Topic:How to display a list of element on many column
Goto Forum:
  


Current Time: Thu Apr 25 11:01:21 GMT 2024

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

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

Back to the top