java - Update JLabel Display with Jtextfield, Jcombobox, Jradiobutton and JCheckbox input (ALL OF THEM TOGETHER) -


i trying update jlabel based on of inputs listed in title. can update jradiobuttons, , jcheckboxes, not else. doing wrong? here code:

write code proper indentation. see 1 example code

                    if(select == itemevent.selected)                      {                         totalamountowed += breakfast;                             //set total amount owed, , format money format.                         lblamountowed.settext("$" + moneyformat.format(totalamountowed));                     } else                             totalamountowed -= breakfast;                             lblamountowed.settext("$" + moneyformat.format(totalamountowed));  

in case lblamountowed.settext("$" + moneyformat.format(totalamountowed)) getting executed twice if enters in if loop. have add open , closing braces else part also.

basically want execute both lines code in else part . beacuse did not add opening , closing braces in else logic , second line not work when condition not satisfied


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -