0
n.add(new CheckBoxGroupIntendedMeal(new String[]{"Breakfast", "Early\n" +"Breakfast", "Lunch", "Afternoon" + '\n' + "Snack","Dinner","Evening\\r?\\nSnack"}));

I have here checkbox with names ,there are name with one word and there are names with two words i want to make the two word names into two lines like this

Early Breakfast

this are the sources i found here link and link any idea is appreciated

Community
  • 1
  • 1
Brownman Revival
  • 3,620
  • 9
  • 31
  • 69
  • Try using `Early
    Breakfast`
    – MadProgrammer Dec 03 '14 at 03:49
  • i also saw that one i am trying to avoid using html here because when i do getText the is coming with it so when i compare text i will have problems. – Brownman Revival Dec 03 '14 at 03:52
  • 1
    Well, you have a choice. You either get the display to work and change the way you a determining which checkbox is selected (like using the objects `name` property or even better, it's `actionCommand` property) or you don't have multiple lines.. – MadProgrammer Dec 03 '14 at 03:54
  • so its the only way.i better look for another way to get the text then..thanks for clarification – Brownman Revival Dec 03 '14 at 03:58
  • 1
    You should probably not be comparing display text. Cannot you attach a stable key or id or value to the checkboxes? – Thilo Dec 03 '14 at 03:59
  • 1
    It will be the simplest... – MadProgrammer Dec 03 '14 at 04:07
  • thank you for the idea i will follow what you are saying i tried `setActionCommand` maybe this solve my problem.also i have one observation when i used ``, `setDisplayMnemonicsIndex` is not working..its is just my observation – Brownman Revival Dec 03 '14 at 04:09

0 Answers0