Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Arrays with Radio Buttons in JavaFX

 
Mark Hoobler
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all, I just wrote the following program:



In the SubmitMethodClick method, I have assigned array values using these tables

Price Table for Plain Cheese Pizza
Small Medium Large
Thin 5.25 8.25 11.25
Thick 6.00 9.00 12.00
Deep Dish 7.25 10.25 13.25

Price Table for Toppings
Small Medium Large
Meat 1.00 1.50 2.00
Veggies 0.50 0.75 1.00

This program is supposed to print a value based on radio buttons/check boxes the user clicks, and look in the array to find the value.
Not really sure if I am going at this the correct way. Is there a way to assign a whole row/column to a radio button/check box.

So I could say something like


Where plainCost [0][] is referring to the entire first row.
That is most definitely the wrong syntax, but I think it gets across what I am trying to do.

Any tips are appreciated. Thank you!
 
Knute Snortum
Sheriff
Posts: 3323
84
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

I'm going to move this to the JavaFX forum.
 
Mark Hoobler
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whoops, sorry about that. Thanks!
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!