• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can varying input to a specified textField's ActionListener elicit corresponding varying output  RSS feed

 
Mary Dawson
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Javaranch,
I wanted to know could action listeners to the TextFields in the labels in the panels generated by running program
Music Input One, be made to return different output in response in accordance to the value written to the Text
Fields.

For instance, if a number were input to the TextField, where it says 'Fret no' and input were an int, say 7, could
Action Listener be created that'd return a different response output to say an input of say 3 ?

I realise ActionListeners can distinguish between different buttons or text areas, to obtain different response
output, but what I want is to be able to use the same space, yet for the contrasting responses to be determined by
the input to the textField.

Are there any methods that could accomplish this, with the given GUI ?
-and if so, are there any tutorials out there that deal with this in some depth ?
Thank you for reading, and thank you for your help.
Yours sincerely
Mary Dawson.

Code follows : -





 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Swing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!