Hmm.. you are talking about high level interface using netbeans.. Actually, java api positions elements in some way or another, depending on the setting of the frame or whatever container the elements reside. If you want a draggable rectangle, you can use a pane with absolute positioning.. But i have not tried it yet.. you may listen for the movement of the mouse then move the pane accordingly..
Best regards,