recompile source code in java method?
<p>Currently want to work out some function like using Jpanel to edit source code and recompile it.</p>

<p>The basic ideal the basic java game I have with using Java.swing to perform. Instead of just showing the game, I will like to show part of the code with just pressing a button. The code will show out and let user to edit, save it with replace the original code. </p>

<p>The coming challenging function wanted to perform is how can the system recompile with pressing one button in the Jpanel? I figure out there's difficulty when wanted to replace the original code and recompile.</p>

<p>Any idea in Java can perform such functionality? Will be appreciated on any comment and guidelines. Thanks </p>
