Checking Java SWT User Access

What is the Java convention when it comes to validating data entry in SWT? I read that there are FieldEditors, which are very convenient fields, but, unfortunately, only for settings and dialog boxes.

I also read that there is an IValidator interface. But it is often used with data binding, which in my case, most of my inputs do not yet need data binding. In addition, IValidator requires me to write my own verification methods even for simple checks, such as only integers, only letters, etc.

Since FieldEditors cannot be used with normal use of input fields, what other convenient way can I use to check on user inputs? I use SWT for my Java GUI.

Thank!

+3
source share
1 answer

You can check the input of your control in VerifyListener. See this forum topic for further explanation.

Alternatively, you can check out the RCP Toolbox , which has a built-in easy-to-use validation system. See this article .

+4
source

All Articles