10,000 lines of code sound like you have everything in this one class.
Start by splitting your source into Model, View, and Control ( MVC ).
You can also extract some JPanels into separate classes. One way to do this is to create a new JPanel (new file) and cut / paste components from one main panel into the new JPanel . Save and compile the new panel.
Then go back to the main frame, select Beans β Choose Bean from your Palette and select the newly created class (for example, com.example.YourPanel ).
Before you try, make sure you have a backup of your application.
source share