Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » JavaFX Panel makes WindowBuilder Crash
JavaFX Panel makes WindowBuilder Crash [message #916164] Tue, 18 September 2012 16:33 Go to next message
Sergio Marquez is currently offline Sergio MarquezFriend
Messages: 1
Registered: September 2012
Junior Member
Hello!
Im new to developing with Swing and JavaFX and I have a problem when using WindowBuilder.

Im using Ubuntu 12.04 x64 and Oracle Java 7.

If I create a new instance of JFXPanel and then open the Designer view, the JVM would crash. Is this a common problem? any workaround?

This is the class im wrote:
package view;

import java.awt.EventQueue;

import javafx.embed.swing.JFXPanel;

import javax.swing.JFrame;
import net.miginfocom.swing.MigLayout;

public class Start {

	private JFrame frame;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Start window = new Start();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public Start() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 450, 300);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(new MigLayout("", "[grow]", "[][grow][]"));
		JFXPanel myFXPanel = new JFXPanel();
		frame.add(myFXPanel);
	}

}


And this is the message Eclipse gives me:

JVM terminated. Exit code=1
/usr/bin/java
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-XX:MaxPermSize=256m
-jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /usr/lib/eclipse//plugins/org.eclipse.platform_3.8.0.dist/splash.bmp
-launcher /usr/lib/eclipse/eclipse
-name Eclipse
--launcher.library /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.dist/eclipse_1503.so
-startup /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
--launcher.overrideVmargs
-exitdata 292c0004
-vm /usr/bin/java
-vmargs
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-XX:MaxPermSize=256m
-jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar 


Thank you


Edit: The same happens in Windows 7 X64 using Oracle Java 7

[Updated on: Wed, 19 September 2012 14:54]

Report message to a moderator

Re: JavaFX Panel makes WindowBuilder Crash [message #941627 is a reply to message #916164] Fri, 12 October 2012 18:22 Go to previous messageGo to next message
Michael Prentice is currently offline Michael PrenticeFriend
Messages: 22
Registered: October 2012
Location: Melbourne, FL
Junior Member
I have not seen anywhere that claims that WindowBuilder supports JavaFX in any way unfortunately.

JavaFX has its own SceneBuilder for building JavaFX interfaces. But I do not believe that it will work inside of a Swing app that includes a JFXPanel.

I don't know a lot about NetBeans (Eclipse user) but they do seem to be adding JavaFX support to their visual designer. I haven't really seen (or looked hard) any news from Eclipse stating any JavaFX work being done for WindowBuilder.


Michael Prentice
GDG Space Coast
Re: JavaFX Panel makes WindowBuilder Crash [message #955391 is a reply to message #916164] Tue, 23 October 2012 19:13 Go to previous message
ioannis kotopoulos is currently offline ioannis kotopoulosFriend
Messages: 2
Registered: October 2012
Junior Member
You will have first to initialize the fxpanel and create a scene for it. Have you seen this
http : //docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm#CHDIEEJE
Previous Topic:"SWT/Jface Java Project" upgrade to new eclipse version
Next Topic:Swing JComboBox, JList, etc have generics in Java 1.7
Goto Forum:
  


Current Time: Sat Nov 29 00:36:17 GMT 2014

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

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