Any Guru can help??

Dear Friends:
I hope to draw the line between different components in a JPanel, but I hope the line should be a component, ie, it can be clicked, highlighted, selected and deleted instead of just painting a line in a panel,
But I search on web and google a while, I did not find this kind of "Line Component Example" to connect components in JPanel,
Can any guru throw some light or give some example??
Thanks in Advance

Then extend JComponent and do you custom paint in the paintComponent() method. Now you line is a component. You can change the Border to make it appear highlighted. You can add a MouseListener to it.

Similar Messages

Maybe you are looking for