This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
i have a jcombobox with items ranging from 5 to -5. my idea is whenever a user selects an item, a point in the form of 'filloval' will be plotted in a rectangle on the jpanel. the problem right now is that when i select the 5 value from the material ratings combobox & press the plot button the 'filloval' isn't drawn at the correct place which is supposed to be at the top of the material ratings box.
my question is how can i assigned the values of the jcombobox let say 5 = 20. i tried using bigger numbers for the items but the results were the same.
probably my explaination isn't that clear. below is my code. please run it & you'll see the problem. if anyone out there has any idea of solving this problem please let me know. thanks in advance.
You take the height of the rectangle, divide it by 10 (difference between MIN and MAX value) and you multiply the selection of the user by this nr.. that gives you a lineair connection between the combobox and the plotted point