Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Swing Browser
icon5.gif  Swing Browser [message #1396068] Mon, 07 July 2014 20:55 Go to next message
Beatriz SanchezFriend
Messages: 22
Registered: July 2014
Location: York
Junior Member
How can I make the browser field work in swing? It works in swt and RAP. I've seen that there is a solution related with fragments but I don't really understand how this works, and I didn't find anything in the forum.
Thanks
Re: Swing Browser [message #1396348 is a reply to message #1396068] Tue, 08 July 2014 07:21 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Betty,

I did try the browser field with our demo widget app and it works fine in swing:
index.php/fa/18499/0/

Can you provide some more information?

1) Can you paste the java code of the browser part in your project?
2) Which version of Scout are you using?

Best regards,
Matthias
  • Attachment: browser.png
    (Size: 121.16KB, Downloaded 1039 times)
Re: Swing Browser [message #1396377 is a reply to message #1396348] Tue, 08 July 2014 08:06 Go to previous messageGo to next message
Beatriz SanchezFriend
Messages: 22
Registered: July 2014
Location: York
Junior Member
I'm using Luna 32 bits I downloaded it a week before the official release.
The code I'm using is the same that I saw in a forum topic. The weird thing is that it works fine with swt and RAP. In swing it says "placeholder for
@Order(20.0)
      public class BrowserField extends AbstractBrowserField {

        @Override
        protected int getConfiguredGridH() {
          return 10;
        }

        @Override
        protected boolean getConfiguredGridUseUiHeight() {
          return true;
        }

        @Override
        protected int getConfiguredGridW() {
          return 2;
        }

        @Override
        protected void execInitField() throws ProcessingException {
          setLocation("http://www.eclipse.org");
      }


This is the picture
index.php/fa/18501/0/
There are no error messages in the console only the "Placeholder for Browser Field"
Re: Swing Browser [message #1396383 is a reply to message #1396377] Tue, 08 July 2014 08:19 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Betty,

I just tried with the latest Luna release and I experience the same problem.

Solution:
1) open your swing development product file: In my case it is <my-project>.ui.swing/products/development/swing-client-dev.product
2) Go to Dependencies tab
3) Click on "Add..." button
4) Choose "org.eclipse.scout.rt.ui.swing.browser.swt.fragment"
5) Go to Overview tab
6) Press synchronize
7) Press Launch application

Does this solve your problem?
I will open a bug for this later on.

[Updated on: Tue, 08 July 2014 08:20]

Report message to a moderator

Re: Swing Browser [message #1396397 is a reply to message #1396383] Tue, 08 July 2014 08:44 Go to previous messageGo to next message
Beatriz SanchezFriend
Messages: 22
Registered: July 2014
Location: York
Junior Member
Thanks for helping me.
Well it made the "placeholder for browserfield" go away but it doesn't display the URL yet..

I get this:
(SWT:1974): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed
Re: Swing Browser [message #1396400 is a reply to message #1396397] Tue, 08 July 2014 08:49 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
1) Which operating system are you using? Windows, Mac, Linux?
2) 32Bit or 64Bit?
Re: Swing Browser [message #1396403 is a reply to message #1396400] Tue, 08 July 2014 08:55 Go to previous messageGo to next message
Beatriz SanchezFriend
Messages: 22
Registered: July 2014
Location: York
Junior Member
ubuntu 64 bits
this is the extended error code
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at com.bsiag.javax.swing.plaf.synth.SynthGraphicsUtils.paintText(SynthGraphicsUtils.java:483)
	at com.bsiag.javax.swing.plaf.synth.SynthLabelUI.paint(SynthLabelUI.java:214)
	at com.bsiag.javax.swing.plaf.synth.SynthLabelUI.update(SynthLabelUI.java:196)
	at javax.swing.JComponent.paintComponent(JComponent.java:769)
	at javax.swing.JComponent.paint(JComponent.java:1045)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1249)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:808)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
	at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:2347): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at com.bsiag.javax.swing.plaf.synth.SynthGraphicsUtils.paintText(SynthGraphicsUtils.java:483)
	at com.bsiag.javax.swing.plaf.synth.SynthLabelUI.paint(SynthLabelUI.java:214)
	at com.bsiag.javax.swing.plaf.synth.SynthLabelUI.update(SynthLabelUI.java:196)
	at javax.swing.JComponent.paintComponent(JComponent.java:769)
	at javax.swing.JComponent.paint(JComponent.java:1045)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1249)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:808)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
	at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
	at java.awt.Dialog.show(Dialog.java:1082)
	at java.awt.Component.show(Component.java:1651)
	at java.awt.Component.setVisible(Component.java:1603)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.eclipse.scout.rt.ui.swing.window.dialog.SwingScoutDialog.openView(SwingScoutDialog.java:189)
	at org.eclipse.scout.rt.ui.swing.AbstractSwingEnvironment.showStandaloneForm(AbstractSwingEnvironment.java:694)
	at org.eclipse.scout.rt.ui.swing.AbstractSwingEnvironment$1$1.run(AbstractSwingEnvironment.java:348)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Re: Swing Browser [message #1397779 is a reply to message #1396403] Thu, 10 July 2014 06:36 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Betty,
I will try to create a similar setup and try again.

Best regards,
Matthias
Re: Swing Browser [message #1401280 is a reply to message #1397779] Tue, 15 July 2014 11:45 Go to previous messageGo to next message
Beatriz SanchezFriend
Messages: 22
Registered: July 2014
Location: York
Junior Member
thanks
Re: Swing Browser [message #1402766 is a reply to message #1401280] Thu, 17 July 2014 13:12 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
When I try to start the Browser widget in Swing, my complete Java crashes:

***WARNING: Gtk+ version too old (major mismatch)
(java:4343): GLib-GObject-WARNING **: specified instance size for type `SwtFixed' is smaller than the parent type's `GtkContainer' instance size

***WARNING: SWT requires GTK 2.10.0
***WARNING: Detected: 3.4.2

(java:4343): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(java:4343): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(java:4343): GLib-GObject-WARNING **: specified instance size for type `SwtTextRenderer' is smaller than the parent type's `GtkCellRendererText' instance size

(java:4343): GLib-GObject-WARNING **: specified instance size for type `SwtPixbufRenderer' is smaller than the parent type's `GtkCellRendererPixbuf' instance size

(java:4343): GLib-GObject-WARNING **: specified instance size for type `SwtToggleRenderer' is smaller than the parent type's `GtkCellRendererToggle' instance size

(SWT:4343): GLib-GObject-WARNING **: cannot register existing type `GtkWidget'

(SWT:4343): GLib-GObject-WARNING **: cannot add class private field to invalid type '<invalid>'

(SWT:4343): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(SWT:4343): GLib-GObject-WARNING **: cannot register existing type `GtkBuildable'

(SWT:4343): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion `G_TYPE_IS_INTERFACE (interface_type)' failed

(SWT:4343): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(SWT:4343): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(SWT:4343): Gtk-CRITICAL **: gtk_widget_get_window: assertion `GTK_IS_WIDGET (widget)' failed
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f4923dad932, pid=4343, tid=139953805289216
#
# JRE version: OpenJDK Runtime Environment (7.0_55-b14) (build 1.7.0_55-b14)
# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libgdk-3.so.0+0x2b932]  gdk_window_get_type+0x382
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /media/Data/eclipse scout/scout luna/eclipse/hs_err_pid4343.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#


I also added the thread dump.
The strange thing about this is, that when we start SWT, the Browser is working
Re: Swing Browser [message #1403096 is a reply to message #1402766] Mon, 21 July 2014 11:23 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Another question, did you run your application with the Rayo look and feel enabled? Can you try to use the plain Swing UI? Is it the same error message?
Re: Swing Browser [message #1403685 is a reply to message #1403096] Fri, 25 July 2014 10:10 Go to previous message
Beatriz SanchezFriend
Messages: 22
Registered: July 2014
Location: York
Junior Member
same thing without rayo but different error

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed

(SWT:4983): GLib-GObject-CRITICAL **: g_closure_unref: assertion 'closure->ref_count > 0' failed
Previous Topic:ProposalField in RAP and SWT
Next Topic:How to delete row on TablePage
Goto Forum:
  


Current Time: Thu Apr 25 10:53:29 GMT 2024

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

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

Back to the top