an applet that increases font size in a label by clicking a button
can somebody help me with this code please? This is an applet that is supposed to set the font size in a label to 4 and keep increasing the size by one with the click of a button as long as it doesn't go over 88. this is my code:
import javax.swing.*;
import java.awt.*
import java.awt.event.*
Public class FontSize extends JApplet implements ActionListener
JLabel name = new JLabel("Ryan")
JButton fontsize = new JButton("Increase font size")
Container c = getContentPane();
public void init();
{
c.setLayout(new FlowLayout());
c.add(name);
c.add(fontsize);
fontsize.add Actionlistener(this);
f = name.getFont();
name.setFont(new Font(f.getSize(8)));
}
public void display;
{
fontsize.setText(name);
}
public void ActionPerformed (ActionEvent e)
{
for(int i = 0; i < 88; i++)
{
Font = Font + 1;
}
I need the corrections as soon as possible. Can somebody tell me what i am doing wrong? thanks.