Shouldn't be too hard if you just need something simple. Just use g.drawLine(x,y,x,y) repeatedly.
while([points left]) {
[g.drawLine]
}
To do dashes, just make two drawLine calls to to paint the (0-25%) and (50-75%) segments between plot points for example.