Solved

label Again

Posted on 2004-03-30
9
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10716775
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
ID: 10716782
Of course you must

import java.awt.Font;

too
0
 
LVL 37

Expert Comment

by:zzynx
ID: 10716903
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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 86

Expert Comment

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

Assisted Solution

by:Mayank S
Mayank S earned 125 total points
ID: 10721267
>> <identifier> expected

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

Expert Comment

by:Mayank S
ID: 10878616
Sounds ok to me.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This video teaches viewers about errors in exception handling.

726 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