SWT_AWT bridge problems [message #455166] |
Mon, 09 May 2005 10:24  |
Eclipse User |
|
|
|
Hi,
I'm using the SWT_AWT bridge to create an AWT frame. On this frame I've
created a JScrollPane and added a custom scrollable Label to this pane. The
problem is that when I push the ALT key down I get the following stacktrace:
java.lang.NullPointerException
at javax.swing.SwingUtilities.getWindowAncestor(SwingUtilities. java:63)
at
com.sun.java.swing.plaf.windows.WindowsRootPaneUI$AltProcess or.postProcessKe
yEvent(WindowsRootPaneUI.java:158)
at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Defaul tKeyboardFocusMa
nager.java:637)
at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Def aultKeyboardFocu
sManager.java:831)
at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Def aultKeyboardFocu
sManager.java:741)
at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKe yboardFocusManag
er.java:592)
at java.awt.Component.dispatchEventImpl(Component.java:3506)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventD ispatchThread.ja
va:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDis patchThread.java
:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread. java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread. java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:10 0)
Anyone could help me ?
Best regards,
Boby
|
|
|
|
|
|
Re: SWT_AWT bridge problems [message #455261 is a reply to message #455207] |
Wed, 11 May 2005 04:02  |
Eclipse User |
|
|
|
Hi Steve,
Done it, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=94618
Best regards,
Boby
"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:d5qq0t$olh$1@news.eclipse.org...
> Yes please do.
>
> "Robert Bacs" <boby@zerosoft.ro> wrote in message
> news:d5prh5$d7p$1@news.eclipse.org...
> > Hi Steve,
> >
> > I wrote a snippet to introduce a bug report and found out that this
> > exception is generated only if I set the look and feel to system LF.
> >
> > UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClass Name());
> >
> >
> > Bellow is the snippet:
> >
> > import java.awt.Frame;
> >
> > import javax.swing.UIManager;
> > import javax.swing.UnsupportedLookAndFeelException;
> >
> > import org.eclipse.swt.SWT;
> > import org.eclipse.swt.awt.SWT_AWT;
> > import org.eclipse.swt.layout.FillLayout;
> > import org.eclipse.swt.widgets.Composite;
> > import org.eclipse.swt.widgets.Display;
> > import org.eclipse.swt.widgets.Shell;
> >
> > public class SWTAWTTest {
> > public static void main(String[] args) {
> > final Display display = new Display();
> > final Shell shell = new Shell(display);
> > shell.setLayout(new FillLayout());
> >
> > Composite container = new Composite(shell, SWT.EMBEDDED);
> > container.setLayout(new FillLayout());
> >
> > Frame frame = SWT_AWT.new_Frame(container);
> >
> > try {
> >
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClass Name());
> > } catch (ClassNotFoundException e) {
> > // TODO Auto-generated catch block
> > e.printStackTrace();
> > } catch (InstantiationException e) {
> > // TODO Auto-generated catch block
> > e.printStackTrace();
> > } catch (IllegalAccessException e) {
> > // TODO Auto-generated catch block
> > e.printStackTrace();
> > } catch (UnsupportedLookAndFeelException e) {
> > // TODO Auto-generated catch block
> > e.printStackTrace();
> > }
> >
> > shell.pack();
> > shell.open();
> >
> > while (!shell.isDisposed ()) {
> > if (!display.readAndDispatch ()) display.sleep ();
> > }
> > display.dispose ();
> > }
> > }
> >
> > If you still think that this is a SWT_AWT bridge problem I will enter a
> bug
> > report with this snippet attached to it.
> >
> > Thanks and regards,
> > Boby
> >
> >
> > "Steve Northover" <steve_northover@ca.ibm.com> wrote in message
> > news:d5oqua$efh$1@news.eclipse.org...
> > > Can you enter a bug report with the code? Thanks.
> > >
> > > "Robert Bacs" <boby@zerosoft.ro> wrote in message
> > > news:d5ns9l$5vu$1@news.eclipse.org...
> > > > Hi,
> > > >
> > > > I'm using the SWT_AWT bridge to create an AWT frame. On this frame
> I've
> > > > created a JScrollPane and added a custom scrollable Label to this
> pane.
> > > The
> > > > problem is that when I push the ALT key down I get the following
> > > stacktrace:
> > > >
> > > > java.lang.NullPointerException
> > > > at
> javax.swing.SwingUtilities.getWindowAncestor(SwingUtilities. java:63)
> > > > at
> > > >
> > >
> >
>
com.sun.java.swing.plaf.windows.WindowsRootPaneUI$AltProcess or.postProcessKe
> > > > yEvent(WindowsRootPaneUI.java:158)
> > > > at
> > > >
> > >
> >
>
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Defaul tKeyboardFocusMa
> > > > nager.java:637)
> > > > at
> > > >
> > >
> >
>
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Def aultKeyboardFocu
> > > > sManager.java:831)
> > > > at
> > > >
> > >
> >
>
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Def aultKeyboardFocu
> > > > sManager.java:741)
> > > > at
> > > >
> > >
> >
>
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKe yboardFocusManag
> > > > er.java:592)
> > > > at java.awt.Component.dispatchEventImpl(Component.java:3506)
> > > > at java.awt.Container.dispatchEventImpl(Container.java:1627)
> > > > at java.awt.Window.dispatchEventImpl(Window.java:1606)
> > > > at java.awt.Component.dispatchEvent(Component.java:3477)
> > > > at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
> > > > at
> > > >
> > >
> >
>
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventD ispatchThread.ja
> > > > va:201)
> > > > at
> > > >
> > >
> >
>
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDis patchThread.java
> > > > :151)
> > > > at
> > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread. java:145)
> > > > at
> > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread. java:137)
> > > > at java.awt.EventDispatchThread.run(EventDispatchThread.java:10 0)
> > > >
> > > >
> > > > Anyone could help me ?
> > > >
> > > > Best regards,
> > > > Boby
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.24263 seconds