Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checkbox positioning

Status
Not open for further replies.

mydavor

Programmer
Mar 21, 2004
41
AU
I am using Java radio buttons and checkboxes. They are shown on the left from the text and I would them displayed on the right hand side from the text:

red thecheckbox
green thesheckbox
blue thecheckbox

How can this be achieved ?

What is the best way to create something like:
Name1 Lastname1 thecheckbox
Name2 Lastname2 thecheckbox
...
 
Don't use the checkbox-Text, but a separate label.
If you need more than one, make a separate class for this.
 
or try this:

JCheckBox cb = new JCheckBox();
cb.setHorizontalTextPosition(SwingConstants.LEFT);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top