Main GUI update for painting
MainPanel added function for matrix element from pixel coordinates