Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Migrating Swing Application
Migrating Swing Application [message #462335] Mon, 10 October 2005 19:46 Go to next message
Eclipse UserFriend
Originally posted by: simon.guertin.usherbrooke.ca

Hi, I have an application still in developpment phases and is completely
in swing.
I would now like to develop the new user interface in SWT. I quickly
tried but failed. Is there a way to have an application running bth
swing JFrames and AWT Shells in the same application? Or do I have to
migrating my complete application so I only use SWT?

I would like to migrate only one JFrame at the time and not the complete
application and still be able to run the new 'In Between' application.

I try to do this from a JMenuItem:

SubscribeWindow w = new SubscribeWindow();
w.open();

and the in the SWT class I do this in the constructor:

Display display = new Display();
sShell = new Shell(display);

and in the open():
createSShell();
Display display = sShell.getDisplay();
while(!sShell.isDisposed()){
if(!display.readAndDispatch())
display.sleep();
}

My application just seems to be frozen after I click on the menu to open
this window.

Thank you

Simon
Re: Migrating Swing Application [message #462336 is a reply to message #462335] Mon, 10 October 2005 22:36 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Simon,
see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet135.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
or http://www.eclipsezone.com/eclipse/forums/t45697.html
Peco
Simon Guertin wrote:

> Hi, I have an application still in developpment phases and is completely
> in swing.
> I would now like to develop the new user interface in SWT. I quickly
> tried but failed. Is there a way to have an application running bth
> swing JFrames and AWT Shells in the same application? Or do I have to
> migrating my complete application so I only use SWT?
>
> I would like to migrate only one JFrame at the time and not the complete
> application and still be able to run the new 'In Between' application.
>
> I try to do this from a JMenuItem:
>
> SubscribeWindow w = new SubscribeWindow();
> w.open();
>
> and the in the SWT class I do this in the constructor:
>
> Display display = new Display();
> sShell = new Shell(display);
>
> and in the open():
> createSShell();
> Display display = sShell.getDisplay();
> while(!sShell.isDisposed()){
> if(!display.readAndDispatch())
> display.sleep();
> }
>
> My application just seems to be frozen after I click on the menu to open
> this window.
>
> Thank you
>
> Simon
Re: Migrating Swing Application [message #462352 is a reply to message #462335] Tue, 11 October 2005 10:42 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 97
Registered: July 2009
Member
What is the benefit of mixing Swing and SWT?
I don't quite see any benefit of mixing it. Rather it's going
to be total mess! If I were you, I will stick with Swing.
If I have compeling reasons to use SWT, then I will write
totally fresh new in SWT.

Regards.


"Simon Guertin" <simon.guertin@usherbrooke.ca> wrote in message
news:diege5$t2a$1@news.eclipse.org...
> Hi, I have an application still in developpment phases and is completely
> in swing.
> I would now like to develop the new user interface in SWT. I quickly tried
> but failed. Is there a way to have an application running bth swing
> JFrames and AWT Shells in the same application? Or do I have to migrating
> my complete application so I only use SWT?
>
> I would like to migrate only one JFrame at the time and not the complete
> application and still be able to run the new 'In Between' application.
>
> I try to do this from a JMenuItem:
>
> SubscribeWindow w = new SubscribeWindow();
> w.open();
>
> and the in the SWT class I do this in the constructor:
>
> Display display = new Display();
> sShell = new Shell(display);
>
> and in the open():
> createSShell();
> Display display = sShell.getDisplay();
> while(!sShell.isDisposed()){
> if(!display.readAndDispatch())
> display.sleep();
> }
>
> My application just seems to be frozen after I click on the menu to open
> this window.
>
> Thank you
>
> Simon
Re: Migrating Swing Application [message #462356 is a reply to message #462352] Tue, 11 October 2005 15:14 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Joe Smith wrote:

> What is the benefit of mixing Swing and SWT?
> I don't quite see any benefit of mixing it. Rather it's going
> to be total mess! If I were you, I will stick with Swing.
> If I have compeling reasons to use SWT, then I will write
> totally fresh new in SWT.
>
Joe,
There isn't good platform framework like eclipse rcp in swing world
There isn't good components in SWT like Swing JTable and general it is
easier write widget and components in swing
I make swing/swt application and beacuse I don't know good binding framework
for swt like spring-rcp

It can be yet many reasons

Peco
Re: Migrating Swing Application [message #462398 is a reply to message #462356] Tue, 11 October 2005 22:34 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 97
Registered: July 2009
Member
"Haris Peco" <snpe@snpe.co.yu> wrote in message
news:digdsi$8in$1@news.eclipse.org...
> Joe Smith wrote:
>
>> What is the benefit of mixing Swing and SWT?
>> I don't quite see any benefit of mixing it. Rather it's going
>> to be total mess! If I were you, I will stick with Swing.
>> If I have compeling reasons to use SWT, then I will write
>> totally fresh new in SWT.
>>
> Joe,
> There isn't good platform framework like eclipse rcp in swing world
> There isn't good components in SWT like Swing JTable and general it is
> easier write widget and components in swing
> I make swing/swt application and beacuse I don't know good binding
> framework
> for swt like spring-rcp

Have you not tried write your own? Writing custom table widgets is not
that hard one might think. Probably talk to SWTPlus to support fancier
tables?
http://www.swtplus.com

Regatrds.

>
> It can be yet many reasons
>
> Peco
Re: Migrating Swing Application [message #462403 is a reply to message #462398] Wed, 12 October 2005 01:24 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Joe Smith wrote:

>
> "Haris Peco" <snpe@snpe.co.yu> wrote in message
> news:digdsi$8in$1@news.eclipse.org...
>> Joe Smith wrote:
>>
>>> What is the benefit of mixing Swing and SWT?
>>> I don't quite see any benefit of mixing it. Rather it's going
>>> to be total mess! If I were you, I will stick with Swing.
>>> If I have compeling reasons to use SWT, then I will write
>>> totally fresh new in SWT.
>>>
>> Joe,
>> There isn't good platform framework like eclipse rcp in swing world
>> There isn't good components in SWT like Swing JTable and general it is
>> easier write widget and components in swing
>> I make swing/swt application and beacuse I don't know good binding
>> framework
>> for swt like spring-rcp
>
> Have you not tried write your own? Writing custom table widgets is not
> that hard one might think. Probably talk to SWTPlus to support fancier
> tables?
> http://www.swtplus.com
>
I can't make table widget for big query with swt Table - see rdb,datatools
or any database tools in eclipse - all have constraint for numebr of rows in
set - I don't want this constraint - I make query with JTable and
scrollable result for any number of row (one or > 1000000)
for binding - it isn't so easy - spring-rcp have bindings for nested
properties and validation framework - but main reason in table widgets
Re: Migrating Swing Application [message #462489 is a reply to message #462403] Wed, 12 October 2005 23:31 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 97
Registered: July 2009
Member
"Haris Peco" <snpe@snpe.co.yu> wrote in message
news:dihhih$s9s$1@news.eclipse.org...
>>> Have you not tried write your own? Writing custom table widgets is not
>> that hard one might think. Probably talk to SWTPlus to support fancier
>> tables?
>> http://www.swtplus.com
>>
> I can't make table widget for big query with swt Table - see rdb,datatools
> or any database tools in eclipse - all have constraint for numebr of rows
> in
> set - I don't want this constraint - I make query with JTable and
> scrollable result for any number of row (one or > 1000000)
> for binding - it isn't so easy - spring-rcp have bindings for nested
> properties and validation framework - but main reason in table widgets

If it is the size problem, then use SWT VIRTUAL table.
I thought you look for some fancy stuff. Check some snipet
on VIRTUAL table.

Regards.
Re: Migrating Swing Application [message #462492 is a reply to message #462489] Thu, 13 October 2005 02:10 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Joe Smith wrote:

>
> "Haris Peco" <snpe@snpe.co.yu> wrote in message
> news:dihhih$s9s$1@news.eclipse.org...
>>>> Have you not tried write your own? Writing custom table widgets is not
>>> that hard one might think. Probably talk to SWTPlus to support fancier
>>> tables?
>>> http://www.swtplus.com
>>>
>> I can't make table widget for big query with swt Table - see
>> rdb,datatools or any database tools in eclipse - all have constraint for
>> numebr of rows in
>> set - I don't want this constraint - I make query with JTable and
>> scrollable result for any number of row (one or > 1000000)
>> for binding - it isn't so easy - spring-rcp have bindings for nested
>> properties and validation framework - but main reason in table widgets
>
> If it is the size problem, then use SWT VIRTUAL table.
> I thought you look for some fancy stuff. Check some snipet
> on VIRTUAL table.
>
It isn't only problem - I have sorting, mouse header events etc
I can't do it with Table - KTable is better, but it isn't enough
Previous Topic:How to hide the context menu "Input Methods" in Linux?
Next Topic:locale and double delimeter
Goto Forum:
  


Current Time: Thu Mar 28 20:20:31 GMT 2024

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

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

Back to the top