I am working on an assignment that requires a UI. I use Eclipse and already have WindowBuilder up and running. A few weeks ago, I created a WindowBuilder SWT project to create my GUI. I did nothing more than layout the elements to get a visual copy of what it would look like, but had no additional code for doing anything.
Since then, I have written most of this code in a separate Eclipse project, one that is not set up as a WindowBuilder project and is also synchronized with Github. I am trying to import my existing WindowBuilder UI into this project, but am running into some problems. At first, I just tried copying the JAVA file over, but I get a ton of errors about missing dependencies. It looks like the WindowBuilder project had a bunch of Referenced Libraries that the normal project does not.
Anyway, is there an easy way to add WindowBuilder capability to an existing project? This would be much much easier than trying to move my existing project into my WindowBuilder project. Any help with this would be great appreciated. Thanks!
is there an easy way to add WindowBuilder capability to an existing project?
Yes,
select the class which you want to open using WindowBuilder and
right click -> Open With -> WindowBuilder Editor
In your case, I would go ahead and simply create a new class within your second project, copy paste all the code from the old WindowBuilder Class into the new class and the enable WindowBuilder Editor using the step above. (Crude but gets the job done).
In order to quickly organize all your missing imports from an existing project you can use:
Ctrl+shift+o
As to any missing libraries in the future, you mentioned using GIT. On the machine where those libraries are present in your project:
right click (the libraries) -> Team -> add to index
Then commit and push. Pull on your other machine and you should have them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With