Du brauchst nur die Pointer abspeichern.
Delphi-Quellcode:
var
Panels: array[0..14, 0..14] of TPanel;
function IndexOfPanel(Panel: TPanel): TPoint;
var
X, Y: integer;
begin
Result.X := -1;
Result.Y := -1;
for X := 0 to 14 do
for Y := 0 to 14 do
if Panels[X, Y] = Panel then
begin
Result.X := X;
Result.Y := Y;
end;
end;
Und in deiner CreatePanelMatrix
Panels[I, J] := Panel;