Add inheritance from JPanel to Line class

The Line class is directly added to the TypePanel, thus, it is better to make
it a JPanel.