Reputation: 57
I'm try to make a notification. I saw a little tutorial but something is not working for me.
JLabel messageLabel = new JLabel('<HtMl>'+message);
"Invalid Character Constant"
Why is this error occurring?
Upvotes: 0
Views: 1090
Reputation: 699
You should use double quotes instead of single quotes to resolve your problem.
Upvotes: 0
Reputation: 3960
You need double quotes the single quotes is for char literals.
JLabel messageLabel = new JLabel("<HtMl>"+message);
or
JLabel messageLabel = new JLabel('l'+message);
Upvotes: 1