I am slightly confused. Have you started to write any code yet?

You could do something like text.getText(); displayed in a JOptionPane

Swing Tutorial: Alert Dialogs (JOptionPane)