Total members 11894 |It is currently Thu Nov 21, 2024 9:16 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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




Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time
Post new topic Reply to topic  [ 1 post ] 

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



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com