Hanging Internal Doors - is a frame made from 2 x 2's strong enough
Weight of doors is critical here.  A solid pine door 1.5" thick = 1/8 cubic foot per square foot * 30 lbs/cubic foot = 4.25 pounds per square foot.  If it were a normal sized door 6'6" x 2'6" you have about 16 square feet so something like 70 pounds.

If it's pine veneer on particle board it may be over 100.  If it's 5/16" cottage plank with Z bracing is could be almost as light as your present doors.

A normal door is hung from doubled studs.  One goes up to the ceiling, one goes to the top of the frame.  Is it actually a 2x2 or is it a 2x4 mounted edgeways?

Try this:  Open the door a few inches.  Put a level along the length of the top of the door, or use a clamp, and clamp it to the door.  

Now hang your weight on the top corner of the door.  Does the level deflect?  How much?
Repeat this test with the door at 90 degrees.  If you get more deflection here, you likely have a 2x4 set edgeways.  It's stiffer in that direction.

Repeat this test with your front door.  Compare the deflections.  If your closet door only deflects a bit more than your front door, you are fine.  If it deflects a lot more, then you need to beef up the frame.