First of all, i have a program where when i click a button an item is added to a list and at the same time i'm trying to get a double to display elsewhere.

I am just in a funk right now and cannot think properly. what is good.

when displayed i currently have a

JLabel Text Field Another Button
Total: Empty Remove Button

what can i use instead of the text field because a text field will only accept string in it. and i am wanting a double of the original button press to be displayed inside that area.


Member Avatar

Use the Object class of the primitive type double (Double) and harness that good ol' .toString() method!