Thursday, June 6, 2013

Eclipse window builder error - This is not a GUI class and cant be edited graphically

The parser parsed the compilation unit, but can't identify any GUI toolkit.
Possible reasons:
  • You open a compilation unit without any GUI, such as an empty class, data bean, etc.
  • Classpath of project is not valid, does not include all required toolkit libraries.
  • You attempt to open UI for toolkit, support for which is not installed in WindowBuilder.
    Use button Show UI Toolkits to install new toolkit.  

Even after installing Window builder components in eclipse, if you get this error, switch to code and insert below code and then switch to design


import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JTextArea;


public class One {    // Your class name

 public static void main(String[] args) {
   
   JFrame f = new JFrame("A JFrame");
   f.setSize(250, 250);
   f.setLocation(300,200);
   f.getContentPane().add(BorderLayout.CENTER, new JTextArea(10, 40));
   f.setVisible(true);
   
 }
}

6 comments:

  1. Thank you Naaz! This solved my issue.
    -zach from the US

    ReplyDelete
  2. u can just
    right click ==> open with ==> and select windows builder editor

    ReplyDelete
  3. Thank you so much! Your page should be first one on search engines. Dk why it isnt.

    ReplyDelete
  4. Thank you so much! Your page should be first one on search engines. Dk why it isnt.

    ReplyDelete