i have created JDBC connection .
i am able to select (read) data from excel sheet
but i need to open a new Excel sheet on click of a button from gui,
displaying the attributes i select that is the checkboxes i select.
So the code already reads and displays some values from an Excel sheet, and now the problem is that you need to add a button to the GUI that causes a different Excel sheet (or file) to be opened, and the currently displayed values are replaced by values of this newly opened sheet/file - is that correct? If so, since you already know how to open an Excel file, read values from it and display them, where is the problem in implementing this?
A very capable library for handling (including creating) Excel files is Apache POI; its web site has numerous examples of how to accomplish all kinds of tasks.
But you said that you're able to read values from an Excel sheet, for which you are presumably using some library; care to tell us how you're doing that?