No valid binding for root component Follow
I am fiddling a bit with the GUI designer, and I must say that I'm really impressed. It is so easy and intuitive to work with.
I also watched the online demo, and I think it was well explained and thoroughly.
So I started out with a complex design right on, but when it came to invoke "Form main()" I got into troubles. To eliminate most variables possibly I started a new project and created a simple GUI (one label and one textfield). But I got the same error.
In both occasions I got this error:
The form bound to the class does not have a valid binding for the root component
I also checked the Component tree and it has no red line or yellow selections (I already made the mnemonics etc.)
Am I missing something?
Please sign in to leave a comment.
TS> I am fiddling a bit with the GUI designer, and I must say that I'm
TS> really impressed. It is so easy and intuitive to work with.
TS> I also watched the online demo, and I think it was well explained
TS> and thoroughly.
TS> So I started out with a complex design right on, but when it came to
TS> invoke "Form main()" I got into troubles. To eliminate most
TS> variables possibly I started a new project and created a simple GUI
TS> (one label and one textfield). But I got the same error.
TS> In both occasions I got this error:
TS> The form bound to the class does not have a valid binding for the
TS> root component
TS> I also checked the Component tree and it has no red line or yellow
TS> selections (I already made the mnemonics etc.)
TS> Am I missing something?
In order to generate the main() method, the top-level panel of a form must
be bound to a field. This is not highlighted as an error because it is generally
a valid situation.
I'll try to make the error clearer, and in the next version the top-level
panel binding will be generated automatically by default.
"Develop with Pleasure!"
L> first of all your Designer is very nice, well done!
L> Still I have a question please (I'm still a beginner): What do you
L> mean concretely by "to bound the top-level panel to field"!?
Select the panel, select the "field name" property in the inspector and enter
the name of the field. The corresponding field will be created in the Java
"Develop with Pleasure!"
Thanks a lot Dmitry. It rocks!
first of all your Designer is very nice, well done!
Still I have a question please (I'm still a beginner): What do you mean concretely by "to bound the top-level panel to field"!?
Oh Thanks for this quick answer..!
Actually I was trying to do what you suggested... but stupidly there was a space in my field name, so it was not working. Now it's fine...
Thanks again and have a nice day...
Since its required - seems like it should pick a default name for the JPanel automatically? It does for other components.
I agree !00% - the UI Designer should absolutely either assign a default name for the root component, or prompt for one.
Good afternoon :
I'm doing a final project of a higher degree, and every time I start your program the same error happens, the xml of the FORM window does not run.
I have tried to give the route manually, but it does not work.
I use bitbucket and I have to copy and paste over the previous xml (which exists) so that everything goes back to normal. Please fix that mistake, it does waste a lot of time, especially in large projects.
I use your latest version, in case the information is useful.
Thank you very much.
Do you mean that the same form doesn't work after restarting IDE?
Is it possible to provide sample project example for investigation?
Yes. my bitbucket is public . My name is k3ym4n and the projet is SGE
Provided project works fine on my machine. Is there MenuBar.xml file in the output folder when you run project after restarting?
Yes, but that menubar.xml is executed after entering the program.
I close it and when I open it again I have to find the .form and make the modification that I explained in the previous post.
I couldn't reproduce the issue on my machine. I built project, ran it (menu is shown fine), restarted ide, ran project (menu is shown). Am I missing some steps?
then it will be my IDE, maybe ... should I reinstall it?
Sometimes it happens only with one window but other happens with almost all.
I finally could reproduce the issue. Seems it caused by reindexing process. Simply reopening form works fine on my machine.
We have related issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-170263
Please follow it for updates
Today the problem has gone to more and I took the class out of the form.
I had to copy everything in a similar class and halfway back to normal.
I will follow the thread
Thank you very much for your attention
You are welcome!