My Oracle Support Banner

[MacOS] Java JTextField Character Does Not Display after Input of Single Quote Using 'US International-PC' Keyboard Layout (Doc ID 2487539.1)

Last updated on JANUARY 03, 2022

Applies to:

Java SE JDK and JRE - Version 8 and later
Apple macOS


When an 'US International - PC' keyboard layout is used on MacOS, a consonant character entered in a JTextField does not render if it is immediately preceded by a single quote or apostrophe character (').  This problem occurs only with Java applications and not with native applications.  For example, entering  'v  produces  'v  in native applications and only  '  in Java applications.

The issue can be reproduced with the following steps:

  1. On MacOS, attach a US International - PC keyboard
  2. Install Java
  3. Compile the following sample program, named


This sample code is provided for educational purposes only. It is not supported by Oracle Support. It has been tested internally, however we do not guarantee that it will work for you. Ensure that you run it in a safe test environment. Additionally, the code and object names used in this article represent fictitious sample names that make up an example. Any similarity to actual code is purely coincidental and not intended in any other manner.

5. After text field appears, type single quote (apostrophe) character ('), then type the letter v.
6. Notice the result is only a single quote (apostrophe) character (') is displayed.


The issue affects the following releases:


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.