Solved

label Again

Posted on 2004-03-30
9
179 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Expert Comment

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

Expert Comment

by:Mayank S
ID: 10721261
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

763 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