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 ?
Try with unicode symbol:
private Label copyrightL = new Label("\u00a9");
Hope this helps,
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() ;
Hold alt key Then press 0169 in numeric keyboard Release alt Enjoy
Is it Java?, try using JLabel and use private JLabel copyrightL = new JLabel("<html><body>©</body></html>");