monomialList[vars_List,m_Integer?NonNegative]:=Flatten[Map[Apply[Times,vars^#]&,Table[FrobeniusSolve[ConstantArray[1,Length[vars]],k],{k,0,m}],{2}]]
randPoly2[deg_]:= 
( l=monomialList[ {x,y}, deg];
Total[RandomInteger[{-10,10}]*# &/@ l]
)
randPoly3[deg_]:= 
( l=monomialList[ {x,y,z}, deg];
Total[RandomInteger[{-10,10}]*# &/@ l]
)

Panel[ 
DynamicModule[ {deg=1, f}, 
Column[{
Row[{"Degree: ",  Dynamic[deg], "  ", Slider[Dynamic[deg],{1,40,1}], "  ", Dynamic[Button["New curve", f=randPoly2[deg];]]}],
Dynamic[ContourPlot[f==0, {x, -5, 5}, {y, -5, 5}, PlotPoints->200, ImageSize->Large]],
Dynamic[f]
}, Center, ItemSize->{100,Automatic}]
]
]