1. I want to build a button, when I press the button, it pop up another window which show a graph on the data the program just calculated.
Can this be done ?
Yes. You can find out about buttons, listeners and dialogs here:
Trail: Creating a GUI with JFC/Swing. For the grid and plotting data use a JPanel, override the/its
paintComponent method and do your custom drawing in it. For more about drawing see the last link (Performing Custom Painting) on the page (link above) and also the first link under the
Other UI-Related Trails header, viz, "2D Graphics".
2. I want to insert a image to be the background of the grids, instead of that piece of white sheet, can this be done ?
Yes. Draw the background image first and then draw your grid.