1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Locale locale=new Locale("ar", "AE");
final InputContext context = InputContext.getInstance();
contexts.add(context);
if (!context.selectInputMethod(locale)) {
jTextField1 = new JTextField("Langue '" + locale.getDisplayName() + "' non supportée");
jTextField1.setEnabled(false);
} else {
jTextField1 = new JTextField() {
public InputContext getInputContext() {
return context;
}
};
}
} |
Partager