How to attach opengl display to a JFrame and dispose of it properly?

Hello, I have a problem where I cam trying to attach the opengl display to a jframe. I did this but when I added a runnable to my code the opengl display is now the same size has my computer screen. I also get an error when I try to close the jframe first before clossing the opengl display. how can I get this to work? Here is a link to the same question I posted on stackoverflow, it contains more details about my problem and my code:
Asked Nov 18, 2014

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.