label Again

I asked for help, but i am still experiencing some problems from the help i got. I asked how you can bold and change the size of a label that is on a panel?
The following is the answer or help I got:

yourLabel.setFont(new Font("sanserif", Font.BOLD, 12));

when I use it, i get the following error:

Z:\playCode\ <identifier> expected
          sysName.setFont(new Font("sanserif", Font.BOLD, 12));

Who is Participating?
CEHJConnect With a Mentor Commented:
Of course you must

import java.awt.Font;

Please post the context of what you're doing, i.e. the whole method
zzynxSoftware engineerCommented:
1) Hey, you're not supposed to have two accounts (krizmotlhala & deweber1)

2) You're supposed to add extre comments on an existing question. And not opening again and again new questions.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

That's certainly true if that's the case.
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
>> <identifier> expected

Is sysName an object? I doubt it. Or else, Font is not imported.
Mayank SAssociate Director - Product EngineeringCommented:
Sounds ok to me.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.