import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Title
{
JFrame f1;
JPanel p1;
JLabel Storys;
Container c1;
boolean end;
public Title()
{
f1 = new JFrame("HOBO");
f1.setSize(750,650);
c1 = f1.getContentPane();
p1 = new JPanel();
end = false;
JPanel Story = new JPanel(new GridLayout(35,1));
Story.setBackground(Color.white);
Story.setFont("CG Times");
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel("This is Hogan. Hogan is homeless."));
Story.add(new JLabel("To be more specific, he's a hobo."));
Story.add(new JLabel("He wanders around more than a bum, but"));
Story.add(new JLabel("he's dirtier than a drifter. The world"));
Story.add(new JLabel("has been changing, and the lifestyle has"));
Story.add(new JLabel("gotten a lot harder to stay alive."));
Story.add(new JLabel("Hogan even considered geting a job..."));
Story.add(new JLabel("His luck made a turn for the better. While"));
Story.add(new JLabel("he was filling out a Wal*Mart application in the"));
Story.add(new JLabel("dumpster behind the store, when he heard of the"));
Story.add(new JLabel("Magical Soup Kitchen, with meat in the soup and"));
Story.add(new JLabel("spoons to eat the soup with. It was like "));
Story.add(new JLabel("Vahaula, only with mor stabbings. It was supposed to be"));
Story.add(new JLabel("a legend, but it looked so real. "));
Story.add(new JLabel("being a curious hobo he went in the Magical Soup Kitchen"));
Story.add(new JLabel("and was awed with amazement. A waiter came up to him and"));
Story.add(new JLabel("had asked if he were homeless or not"));
Story.add(new JLabel("\"Of course\" he said with confidence"));
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel(""));
Story.add(new JLabel("Press Enter..."));
p1.add(Story);
c1.add(p1);
f1.show();
}
}
the message is
"cannot find symbol - method .setFont(java.lang.String"
Message was edited by:
ichbinsterben
> > Font font = new Font(...);
> > aLabel.setFont(font);
>
> i still get errors, i must be doing something wrong
Great. We have still not learnt how to read minds, but we are working on it. Why aren't you providing us with the error message when you say that something isn' working?
> > > Font font = new Font(...);
> > > aLabel.setFont(font);
> >
> > i still get errors, i must be doing something
> wrong
>
> Great. We have still not learnt how to read minds,
> but we are working on it. Why aren't you providing us
> with the error message when you say that something
> isn' working?
i told you already.
> > > > Font font = new Font(...);
> > > > aLabel.setFont(font);
> > >
> > > i still get errors, i must be doing something
> > wrong
> >
> > Great. We have still not learnt how to read minds,
> > but we are working on it. Why aren't you providing
> us
> > with the error message when you say that something
> > isn' working?
>
>
> i told you already.
I have in that case already given you the answer. See reply #11