masking

Masking password input from the console : Java

心不动则不痛 提交于 2019-11-26 02:07:37
How to mask a password from console input? I'm using Java 6. I've tried using console.readPassword() , but it wouldn't work. A full example might help me actually. Here's my code: import java.io.BufferedReader; import java.io.Console; import java.io.IOException; import java.io.InputStreamReader; public class Test { public static void main(String[] args) { Console console = System.console(); console.printf("Please enter your username: "); String username = console.readLine(); console.printf(username + "\n"); console.printf("Please enter your password: "); char[] passwordChars = console

Masking password input from the console : Java

99封情书 提交于 2019-11-26 01:09:57
问题 How to mask a password from console input? I\'m using Java 6. I\'ve tried using console.readPassword() , but it wouldn\'t work. A full example might help me actually. Here\'s my code: import java.io.BufferedReader; import java.io.Console; import java.io.IOException; import java.io.InputStreamReader; public class Test { public static void main(String[] args) { Console console = System.console(); console.printf(\"Please enter your username: \"); String username = console.readLine(); console

Masking(crop) image in frame

无人久伴 提交于 2019-11-26 00:45:45
问题 Having a rich UI application in which I want to show image with complex shape like this Now what I want is to crop my image as per Mask image, Actually image is coming dynamic and can be imported from Camera or Gallery(square or rectangle shape) and I want that image to fit in my layout frame like above So just wondering that how do I have achieve this? Any idea /hint welcome Background frame Mask Like this 回答1: Finally got the solution while changing mask image and using of Xfermode with