I was creating a JFrame for a project and while trying to edit it, the design tab was blank.
I've created a test project with everything on default and this "error" still there.
Here's the code of the test:
package test;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
public class Test extends JFrame {
private JPanel contentPane;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Test frame = new Test();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public Test() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
contentPane.setLayout(new BorderLayout(0, 0));
setContentPane(contentPane);
}
}
And this is what i've done already:
WindowBuilder is already installed, both 1.9.5 and 1.9.6.pre Nightly Build (i've tried installing only one of them too but no success).
I have installed all the necessary packages for Swing, including: Swing Designer, All SWT Components, and all WindowBuilder Components.
I've tried to uninstall and install it again all of those packages and components, but still no success.
The option "Associate WindowBuilder editor with automatically recognized Java GUI files" on Window>Preferences>WindowBuilder is already checked.
The only thing left would be reinstalling Eclipse which i'm kinda concerned with because of how many plugins i have installed. Reinstalling them would be a pain (kinda of).
Does WindowBuilder have some incompatibilities with some plugin? I have a few for Python and others that is just QoL.
EDIT: Problem solved, for anynone going through that as well, just add --illegal-access=permit
in the eclipse.ini in the last line.
This is a known and already fixed issue when running Eclipse with Java 16 or higher :
WindowBuilder issue #45 - Reflective access with CGLIB breaks windowbuilder in java 16 and higher
Update : The issue has been fixed . It is already available in the WindowBuilder Nightly Build (update site:https://download.eclipse.org/windowbuilder/lastgoodbuild/
) and will be available in the upcoming WindowBuilder 1.9.8 release.
Open new project in JavaSE-11 and downgrade window builder to version 1.9.4 and everything will work fine. I have had the same problem.
I think you have to refer following as it is working at my end
Issue
After creating new application, WindowBuilder design view is blank. No pallets, no window displayed when using Java 17, WindowBuilder 1.9.7 and Eclipse 2021-12
Possible solution(s)- AS PER SUGGESTIONS ABOVE (AND BELOW)
I tried the above solutions but nothing works. This is what works for me:
https://download.eclipse.org/windowbuilder/lastgoodbuild/
Use Help>Install New Software then add the link above After installation, restart eclipse
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.