All JComponents inherit a method:
protected void paintComponent(Graphics g)
Using that Graphics object, which can almost always (with the exception of using DebugGraphics, in my experience and from what I've read, but someone can feel free to contradict me) be safely cast to a Graphics2D object. From either a Graphics or a Graphics2D object you can draw lines.
Another option would be to load line images and display them as the icon of a JLabel using absolute positioning, or implement your own JComponent which draws the lines and then add it to the panel (the Swing tutorial has a nice intro to custom components).