Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

Java Programming help please?

Thu Feb 18, 2010 4:33 pm

I need to create a JApplet containing a JLabel and a Jbutton. a JButton should automatically change font typeface, style and size when clicked. I have this coding so far :

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JChangeFont extends JFrame implements ActionListener
{
JLabel name = new JLabel ("Your Name");
Font bigfont = new Font ("Arial",Font.ITALIC, 16);
JButton press = new JButton ("Press");
final int WIDTH = 450;
final int HEIGHT = 200;

and I am stuck here, I don't know what to write forward, can you please show me the coding for changing jbutton font?

Thanks for your help



Post a reply
  Related Posts  to : Java Programming help please?
 i want some help in java programming     -  
 Programming a Defragger in Java     -  
 Programming Calendar Java     -  
 Java Programming Problem: Pascal's Triangle     -  
 C++ programming     -  
 ALP programming     -  
 Programming.PHP.2nd.Edition.zip     -  
 How do you know when to use the right programming language?     -  
 Safe Programming     -  
 Different Styles of Programming     -