Hi, is there any website have a lots of sample code and eg. to download. I'm quite new to

JAVA cos no

sticky threads for this.

& also how can I do a simple buttongroup with captions?

Always good place to start your search is http://java.sun.com/docs/books/tutorial/
also, google search for "java tutorial" or more specific "java button tutorial" bring plenty of other resources.
To second question if I got it right, you want to use ButtonGroup and give it some caption/title. If that what you want, then this is no complex. For caption use Label/JLabel where you pass string which is displayed and together with ButtonGroup put them into Panel/JPanel

Labby, please remove the advertising from your post as well. It has no bearing on your question and is not approriate for the forum.

And no, there is no site where you can download complete solutions to your homework assignments.
Or if there is it's not in anyone's interest to give you the location for it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.