Was this for a commercial property? Assuming that it is, did you serve the property owner and the general contractor with a "notice of furnishing" within 21 days of beginning the work on the project? After completing the work, did you serve an "affidavit of mechanics' lien" on the filed with the county recorder within 75 days of the last completed work, and was that affidavit served upon the owner and general contractor within 60 days of filing with the recorder? These steps are necessary in order to secure a mechanics' lien. If you didn't do any of these things, it may or may not be too late to secure a lien. Check with the county recorder to determine if a "notice of commencement" was filed by the property owner. If so, you're probably out of luck as far as a lien goes. If a "notice of commencement" was not filed, serve a "notice of furnishing" and an "affidavit of mechanics' lien" asap.
Aside from all of the above, you can always sue the contractor you sub-contracted with.
If you would like to discuss your case, please call me at 216-225-9181, or email me at email@example.com.
Disclaimer: I am not offering legal advice. I am just making suggestions for starting points for when you do speak with an attorney. Do NOT rely on anything I write and contact a lawyer.