How to open and copy the content of a file to a textbox in SWT?

I have a GUI that I create using SWT. In this GUI there is button and this button helps to select only files. Once you select the file in the file dialog window, the whole content of the file should be populated in the text box that I have in my GUI.

How can I do it using SWT?
Who is Participating?
ValeriConnect With a Mentor Commented:
take a look here:
this is because one and the same class serves reading from file and writing to file
Here is interesting link

Hope it is useful to you.
check out this tutorial:

good luck.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.