Skip to content

Tag: string

How to centre-justify and format String in Java

I know that there are many previous explanations, but similar to my problem I did not find ! Simply i have a code to drow a bill info using graphics2d ! My Full Code IS : the output is like this : my problim is in this line : After i used a String.format it is must do the center

How do I change the distance between words?

How can I change the distance between words in a string in Android Studio using the methods? I need the distance to be about half the size of the standard space. as I understand it, after BackgroundColorSpan(Color.BLACK), you can add a parameter to change the distance between words. Answer There are different…