i have .java file. i need to generate .form file using the java file. when i write a java file then automatically .form file should be created. by using java swings how can we create .form file
Your question is as vagues as they get, but usually it's the other way around - you generated java code from a form file created by a GUI designer such as NetBeans Matisse, Eclipse Jigloo or IntelliJ IDEA Forms designer. Although they all use the .forms extension the internal format differs wildly on different IDEs - it's generally some xml markup, that's later used to generated to Java code related to the GUI layout, so you wouldn't have to code it yourself. I find it hard to believe you want to generate form files from an existing layout...
As far as I know Sun Java Studio Enterprise is based on NetBeans, so probably your GUI designer is Matisse. There is no way to regenerate the form from they Java code(at least nothing short of you writing some tool to parse the code in the initComponents() method, which will be a start, but not enough to get everything back). As gnoupi pointed in the other question you posted - your best bet would be to read the existing source and restore the form based on it. All this of course assumes that you're not using version control and there is not way to restore the project's missing form file from there.