I am studying a java tutorial and saw that the way to find the x/y indexes of a JButton inside a GridLayout is to traverse a bidimensional array of buttons b which is associ
this solution selects everything object between like them
first
write method that get text or Everything needed for Jbuuton or jlable or....
second change under code
public class Event_mouse implements MouseListener {
@Override
public void mouseReleased(MouseEvent e) {
try {
Everything source = (Everything) e.getSource();
if(Everything.gettext==gol){
}
} catch (Exception ee) {
JOptionPane.showMessageDialog(null, ee.getMessage());
}
}