I need to change the font size after I click. How can I do that - Thanks!

here is the code

import java.applet.*;
import java.awt.*;
import java .awt.event.*;
import javax.swing.*;
import java.util.*;
public class JChangeFont extends JApplet implements ActionListener
  {
   
    JLabel question = new JLabel("Who's number one?");
   JButton click = new JButton("Click");
   JLabel questionText = new JLabel(" ");
   Container con = getContentPane();
	 
	 public void init()
	 	   {

	     con.add(question);
	    con.add(click);
	    con.setLayout(new FlowLayout());
	    click.addActionListener(this);
	   }
		  
   public void actionPerformed(ActionEvent e)
 	   {
	
			 	questionText.setText("Who's number one?");
				con.add(questionText);
				validate();
		}
 }

Why is this marked as solved? If you solved, why didn't you post solution?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.