Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » mouse interaction for Sing / SWT bridge
mouse interaction for Sing / SWT bridge [message #407064] Thu, 08 January 2004 19:58 Go to next message
Eclipse UserFriend
Originally posted by: moopa06.ca.com

eclipse3m5.
I cannot get any swing things to respond to mouse events. For example a
JButton just sits there. A Button (awt) works fine - so I must be doing
almost the right thing.
Any ideas?
Re: mouse interaction for Sing / SWT bridge [message #407995 is a reply to message #407064] Fri, 09 January 2004 10:44 Go to previous messageGo to next message
Eclipse UserFriend
Which platform? Can you get this snippet to work?

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/snippits/snippet135.html

"paul moore" <moopa06@ca.com> wrote in message
news:btkuc4$2kl$1@eclipse.org...
> eclipse3m5.
> I cannot get any swing things to respond to mouse events. For example a
> JButton just sits there. A Button (awt) works fine - so I must be doing
> almost the right thing.
> Any ideas?
>
>
Re: mouse interaction for Sing / SWT bridge [message #407999 is a reply to message #407995] Fri, 09 January 2004 12:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: moopa06.ca.com

the snippet works (as free standing app).

My simplest test is this (in a ViewPart)
Frame m_frame;
public void createPartControl(Composite parent)
{
m_frame = SWT_AWT.new_Frame(parent);

m_frame.setLayout(new BorderLayout());

m_frame.add(new JButton("hello"), BorderLayout.NORTH);
m_frame.add(new Button("hello 2"), BorderLayout.SOUTH);
m_frame.add(new JTree(), BorderLayout.CENTER);

}

the button works fine but the jbutton and the jtree (popluated with
default nodes = colors, sports,...)just sit there
Re: mouse interaction for Sing / SWT bridge [message #408000 is a reply to message #407999] Fri, 09 January 2004 12:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: moopa06.ca.com

windows xp
Re: mouse interaction for Sing / SWT bridge [message #408002 is a reply to message #407999] Fri, 09 January 2004 12:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: moopa06.ca.com

Just to be clear. I am running my code as an eclipse 3.0 m5 RCP plugin.
With free standing app I have no problems.
Re: mouse interaction for Sing / SWT bridge [message #408775 is a reply to message #407999] Wed, 14 January 2004 13:10 Go to previous messageGo to next message
Eclipse UserFriend
Sorry Paul, I can't look at this now. Can you enter a bugzilla report with
the fragment? Thanks.

"paul moore" <moopa06@ca.com> wrote in message
news:btmoeb$3rq$1@eclipse.org...
> the snippet works (as free standing app).
>
> My simplest test is this (in a ViewPart)
> Frame m_frame;
> public void createPartControl(Composite parent)
> {
> m_frame = SWT_AWT.new_Frame(parent);
>
> m_frame.setLayout(new BorderLayout());
>
> m_frame.add(new JButton("hello"), BorderLayout.NORTH);
> m_frame.add(new Button("hello 2"), BorderLayout.SOUTH);
> m_frame.add(new JTree(), BorderLayout.CENTER);
>
> }
>
> the button works fine but the jbutton and the jtree (popluated with
> default nodes = colors, sports,...)just sit there
>
Re: mouse interaction for Sing / SWT bridge [message #410910 is a reply to message #407064] Sat, 17 January 2004 08:44 Go to previous message
Eclipse UserFriend
Originally posted by: jmickelonis.earthlink.net

paul moore wrote:

> eclipse3m5.
> I cannot get any swing things to respond to mouse events. For example a
> JButton just sits there. A Button (awt) works fine - so I must be doing
> almost the right thing.
> Any ideas?
>
>

Yeah. You're adding directly onto the awt frame... try creating an awt
panel, adding to that, then adding the panel to the frame, like in the
example. The components will then respond to all mouse events.
Previous Topic:Printing and printing dialogs
Next Topic:populting swt tables scalability
Goto Forum:
  


Current Time: Thu Nov 06 14:16:04 EST 2025

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

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

Back to the top