First off, get all of that code out of the main method and instead create a proper class with instance fields and methods. Until you do that, you'll not be able to make a GUI out of any of this.