Logic from SWT text box

I’m trying to do string processing off of input provided in an SWT text box. The response needs to be printed to a label box in the same SWT window. I have a listener like this:

    text.addListener(SWT.Traverse, new Listener()
    {
        @Override
        public void handleEvent(Event event)
        {
            if(event.detail == SWT.TRAVERSE_RETURN)
            {
                System.out.println("ENTER PRESSED!");
                System.out.println(text.getText());
                text.setText("");
            }
        }
    });

It recognizes when the enter key is pressed, which is exactly what I’m looking for, but I don’t know where I should put my logic processing. My original plan was to call the SWT window, and use a setter to set the label’s text, but my code doesn’t reach the logic processing because it just holds at the initialization of the window.