#Transfer input from JavaFX textlabel to a client class?
1 messages · Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
public CharSequence getCharacters()
Returns the character sequence backing the text field's content.
assuming you want the content in tf_message to send to your sendMessageToServer method
look into design patterns and OOP
idk anything, observer, pub-sub, whatever feels right to you
The point is to construct your classes in a way that they can flexibly communicate with each other
so if you have a GUI with a button for example, you might create a class for the ButtonPress event
and in your default button handler code, call the handler
that button handler class you create might accept some other classes that it might need to handle your event (such as your Client)
but the view might not have a reference to the Client (to pass to the button handler), so you might have something in the middle (e.g. a controller)
so look into MVC
Sure ...
which exceptions ?