sayan, setDefaultCloseOperation() is not a static method so you can't invoke it on the classname.
Maha,
you should have given us a small sample of the code JBuilder generates. Some of us don't use GUI builders (I find they generate confusing and hard-to-maintain code). Without the code we are just guessing as to what the problem is.
You say that the code "does not name the frame". I take it that the code does not create a varaible to store an JFrame instance. There must be a reference SOMEWHERE, otherwise you would not have much of a GUI. I think JBuilder has either: 1) made your class a subclass of JFrame or 2) used a short-lived variable in a constructor or other initalizer. If 1 is the case, all you have to do is invoke the correct methods on "this" (i.e. this.dispose()). If 2 is the case, you need to find where the temporary JFrame instance is declared and move it to a longer-lived declaration:
Then you can invoke methods on the instance variable aFrame.