A
A
Anatoly2016-05-22 15:05:11
Java
Anatoly, 2016-05-22 15:05:11

How to add keys from selection key to combobox java fx?

Hello everyone, I am writing a server in java with non-blocking sockets. The crux of the matter is this. I have a combobox on the form and when the client connects, I have to add it to the combobox

if(key.isAcceptable())
                {
                    accept(key);
                    Platform.runLater(components.AddObservableList(list, key));
                }

it doesn't work that way, the same object is added. How to add correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly, 2016-05-22
@reactive93

I figured it all out myself, I had to add it to the accept method
and now this key can be tied to anything

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question