You shoud first create a good (yet simple) model of your TileMap. I am thinking of a Map class, and it could contains an 2D-Array of Tile objects, which have an Image property.
This is the basic model, you can later add properties for supporting overlays, checking for walkable areas, jagged (no square) maps and so on.
Derive from JPanel or JComponent, and override its paint-Method. Check for the JavaDoc of Graphics class. In the method you go through the tiles of the map and draw its images (using Graphic's methods).
With a MouseListener attached, you can check which Tile you have clicked on, change its Image and draw the component anew.
Try to play around a bit with it, the details depend on the style of you map and game.


