Reputation: 19347
I want to put a copyright on my Form. I tried to write ©
private Label copyrightL = new Label("©");
but it did not work. So how to write the © symbol ?
Upvotes: 2
Views: 16378
Reputation: 340070
Every character defined in Unicode has a unique integer number assigned to it.
Determine the number for your desired character. The COPYRIGHT SIGN is decimal 169, hexadecimal A9.
Create a single-character string.
int copyrightSymbolCodePoint = 169 ;
String s = Character.toString( copyrightSymbolCodePoint ) ;
Or, append using a StringBuilder
.
StringBuilder sb = new StringBuilder( "Copyright symbol is " ) ;
an.appendCodePoint( copyrightSymbolCodePoint ) ;
String output = sb.toString() ;
Upvotes: 1
Reputation: 1
Hold alt key Then press 0169 in numeric keyboard Release alt Enjoy
Upvotes: -1
Reputation: 1
Is it Java?, try using JLabel and use private JLabel copyrightL = new JLabel("<html><body>©</body></html>");
Upvotes: -2
Reputation: 18517
Try with unicode symbol:
private Label copyrightL = new Label("\u00a9");
Hope this helps,
Upvotes: 12