Forums Register Login

Using Method Invocations

+Pie Number of slices to send: Send
Hi I have the following code:


Do you see the part of my code with the XXXXX's? I have the user input the name of a color in the string earlier in the program. How do I use the string in place of the XXXX's? The name of the string is "color", quite appropriately.
+Pie Number of slices to send: Send
Here's one way...
+Pie Number of slices to send: Send
You can't pass [i]color[i/] as an arg to Color.Just use if-else to determine which Color to choose.


Anyone has better method?
+Pie Number of slices to send: Send
Hi,
if you are using java 5.0 you can do something like that.




Julien
Every plan is a little cooler if you have a blimp. And a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 727 times.
Similar Threads
Calling methods using dynamic binding
String split function and "||" String
component layout not wrapping inside Panel
detect textfield
Change the color of a JTable cell on mouse click
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:49:02.