I am designing a small desktop application in swings with Netbeans IDE and i am using JXDatePicker for fetching the dates. Is it possible to make the editable field as non-editable by the user ie only a button click allow user to add date in field.
Is it possible to make the editable field as non-editable by the user i
Yes!! You can do it like this
jxDatePicker.getEditor().setEditable(false);
jxDatePicker.getEditor()
will return the javax.swing.JFormattedTextField
used to edit the date selection.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.