I have a JFrame->JPanel->JButtons.. with actionListener store the first clicked button to first JButton variable and the second clicked button to another one. My goal is to learn if those two buttons are connected together (connected means there is a "path" of specific ImageIcon on the rest buttons between the first and the second button only horizontal or vertical). I have created a method called
class boolean legalMove(JButton current)to a second class and i would like to know how is possible to learn if exist a "path" or not between those two. If anyone has better idea, is welcomed
thank you
Edited by toto_7, 13 May 2011 - 02:11 AM.


Sign In
Create Account


Back to top









