JCheckBox label posiion
Hi...
I want to put the label of my JCheckBox above the "checkBox". Is there a way to do that or I'll need to create a neu JLabel to put over it?
If I need a label, how can I center the checkBox with the label? (I want the checkBox to be under and horizontally in the middle of the text).
[308 byte] By [
Leo77a] at [2007-11-27 7:41:50]

# 5
I've seen that method... ( setIconTextGap(1000); )I didnt noticed any difference...Isnt this method to separate the icon and the text? I want to separate the checkBox from the text, not from an Icon I dont have...Message was edited by: Leo77
Leo77a at 2007-7-12 19:22:33 >

# 8
> I've seen that method... ( setIconTextGap(1000); ) I didnt noticed any difference...
Works fine for me.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
Don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the posted code retains its original formatting.
# 10
> Maybe it only works when the text is to the right of the check mark
Don't guess. Try it!
Like I said, it works for me.
Unless actual code is posted why waste time guessing what the OP is doing wrong. Thats why I always ask for a SSCCE, so we don't waste time guessing, wondering what strange code the OP might be using.
If it doesn't work, then maybe its a platform issue or a LAF issue but we won't know unless a SSCCE is posted.