Solved

label Again

Posted on 2004-03-30
9
176 Views
Last Modified: 2010-03-31

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
Comment
Question by:deweber1
  • 3
  • 3
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Please post the context of what you're doing, i.e. the whole method
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 125 total points
Comment Utility
Of course you must

import java.awt.Font;

too
0
 
LVL 37

Expert Comment

by:zzynx
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
That's certainly true if that's the case.
0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
0
 
LVL 30

Assisted Solution

by:mayankeagle
mayankeagle earned 125 total points
Comment Utility
>> <identifier> expected

Is sysName an object? I doubt it. Or else, Font is not imported.
0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
Sounds ok to me.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now