"how can i use shorter code like eclipse in netbeans while using swing designer? "
- Go to Tools -> Options
- Click Java Button
- Click GUI Builder tab
- De-select Generate Fully Qualified Name of Classes
As you Drag and Drop components, imports will be added for you.
Also, if you want to hand code a component that has not been imported yet, just hit Shift + Ctrl + I to resolve all imports.
There is also a per-form option: select the root node in Inspector window and see Generate Full Classnames property in Properties window.