custom Swing component



hi all,

i want to create a custom component with a text field and a button. i'm
using netbeans IDE.when i place it to a container and resize the
component, i want the text field to be resized accordingly. how would i
do that. please help

Chanchal

.