Draw arrow on top left of scrollpane
问题 I have a JPanel within a JScrollPane. In my program, the JPanel shows an image of map and it shows the current location of a vehicle. My program receives the location and current direction of the vehicle. I need to show this on the map. I'm having a problem showing the direction of the vehicle. I want to show an arrow on the top left of the map's visible area to show the direction. The following is the code that I have tried. But it throws an exception when I scroll down. Exception in thread