The Java APIs do not have an easy to use password dialog box. This one is written for swing, it extends JDialog. The language displayed is chosen automatically from the system default.
Translations gladly accepted. Please translate PasswordDialog.properties. You may want to use: Attesoro - A Java Translation Editor