WindowBuilder Design Tab incomplete in Eclipse
Asked Answered
A

3

6

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.

This is what the design tab shows

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.

Aswarm answered 5/5, 2021 at 2:42 Comment(4)
Is it this ? Otherwise, tell both, the Java version used to run Eclipse (see Help > About Eclipse IDE: Installation Details: Configuration) and the Java version used in your project. Did this only happen using the Dark theme or also with the default Light theme?Putman
I use jdk-16.0.1 in both Eclipse installation and in the project, it's the only version i have installed for now, and yes this "error", if you will, happens on the default classic theme as well, and about that --illegal-access=permit argument that you referred, do you know where exactly i should put in my .ini? I'm kinda new to Java and so, Eclipse.Aswarm
In the eclipse.ini file add --illegal-access=permit as last line.Putman
Yeah, it's working now, thank you a lot! @PutmanAswarm
P
14

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.

Putman answered 7/5, 2021 at 6:40 Comment(0)
R
0

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.

Respecting answered 10/5, 2021 at 11:14 Comment(0)
P
0

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)

  1. Revert to Java 11 and WindowBuilder 1.9.4 (not ideal)
  2. Add --illegal-access=permit to the ini file of Eclipse (Already there in the ini file of 2021-12)
  3. Update WindowBuilder to the nightly build version 1.9.8.pre (Works!!!!)
Peeress answered 27/2, 2022 at 8:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.