java - How to refactor Netbeans generated GUI code? -


I created a GUI in Netbeans through the Netbeans Swing GUI manufacturer, so I just drag the swing component from the "palette" window and Dropped and all the code were generated by Netbeen.

Now the code is too long to maintain (approximately 10,000 lines). So some experts suggested me to refactor my code.

I can refer to the code that was generated by me but I do not know how to reboot the generated code by Netbeans because it does not allow editing in its generated code.

Any suggestions?

10.000 lines of code sounds like you have everything in that single class.

Start by dividing your source into the model, view and control ().


You may also be able to remove some one way to do this in different classes, create a new JPNL (new file) and Cut / paste your composits from a main panel into that new JPanel . Save your new panel and compile it.

Then go back to your main frame, select beans -> bean select from your palette and the newly created square (For example, com.example.YourPanel ).

Make sure to back up your apps before trying it on.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -