I'm using the method drawLine
to draw lines in a JPanel
.
Is there a way to add an ActionListener
, or something similar to the lines, so that clicking on the lines will pop out a JOptionPane
?
Any other alternative to drawing lines that can suit my purpose?