Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to regenerate my corrupted GUI form?

Hej all,

Yesterday before finishing my work I build up my project in NetBeans and saved it. Today when I got up and open project, I got a warning like this: http://imageshack.us/photo/my-images/812/problemez.png/.

What can I do in order to recover my GUI form? now my GUI is just in read-only mode, what is totally useless ...

Thanks!

Michal.

OK I have done it finally. For those of you who would find similar problem: 1. Create new GUI JFrame form in the same project. 2. Copy all the compoments from the previous JFRame form(in read-only mode) into the new one 3. There will be automatically created new code, now correctly. 4. Just copy all your code into the new form code.

like image 801
MichalB Avatar asked Dec 07 '11 15:12

MichalB


2 Answers

For those of you who would find similar problem:

  1. Create new GUI JFrame form in the same project.
  2. Copy all the components from the previous JFrame form(in read-only mode) into the new one
  3. There will be automatically created new code for new form.
  4. Just copy all your code (your methods) into the new form code.
like image 55
MichalB Avatar answered Nov 07 '22 23:11

MichalB


most likely you removed the parts that say 'generated code here'

(the lines look like this:

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
...
}// </editor-fold>//GEN-END:initComponents

recreate them. And be aware that there are more than just the ones for initComponents.

like image 5
Angelo Fuchs Avatar answered Nov 08 '22 00:11

Angelo Fuchs