• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

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\Simulator.java:112: <identifier> expected
          sysName.setFont(new Font("sanserif", Font.BOLD, 12));
                                               ^


0
deweber1
Asked:
deweber1
  • 3
  • 3
2 Solutions
 
CEHJCommented:
Please post the context of what you're doing, i.e. the whole method
0
 
CEHJCommented:
Of course you must

import java.awt.Font;

too
0
 
zzynxSoftware engineerCommented:
1) Hey, you're not supposed to have two accounts (krizmotlhala & deweber1)
cf. http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20937635.html

2) You're supposed to add extre comments on an existing question. And not opening again and again new questions.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
CEHJCommented:
That's certainly true if that's the case.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> <identifier> expected

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now