i should retrieve the image from the data base using popup window. How to do that?
I'm sorry, I'm really confused. Are you saying the popup window will actively retrieve the image or are you asking if this is a good idea. Though there are other design techniques, I'm a little familiar with MVC (Model View Controller). The View (popup window) shouldn't know the database exists.
If I was designing it, the controller would retrieve the information from database when an event has been triggered, pop up a window, then shove the picture into the view.
As you can see, the act of gathering the picture and displaying the picture are decoupled. I suggest looking at Swing Tutorials on popups and displaying pictures along with tutorials on how to store and retrieve pictures from a database.
If you can't store a picture in the database, (I don't think you can), you can store the picture's path name in the database.