title: Scroll bar on JFrame in Java Swing
body: <p>So I have a JFrame of size 500x500 on which I am drawing a line from (0,200) until (100000,200) using g.drawLine(x,y). The problem is I cannot see the entire line as there is no scroll bar. Could someone please tell me how to have a scroll bar in this particular situation to see the entire line upto the point (100000,200). </p>