Change java radio button text color

*********************************************************************
COMPLETE SOURCE CODE FOR : ChangeJavaRadioButtonTextColor.java
*********************************************************************


import javax.swing.JFrame;
import javax.swing.JRadioButton;

import java.awt.FlowLayout;
import java.awt.Color;

public class ChangeJavaRadioButtonTextColor
{
public static void main(String[]args)
{
JRadioButton a=new JRadioButton("I AM A RADIO BUTTON");
JFrame b=new JFrame("CHANGE RADIO BUTTON TEXT COLOR");
b.setLayout(new FlowLayout());

//METHOD setForeground will change radio button's text color
//You can see more color in Color class on Java API
a.setForeground(Color.GREEN);

b.add(a);

b.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
b.setSize(400,400);
b.setVisible(true);
}
}


*********************************************************************
JUST COMPILE AND EXECUTE IT
*********************************************************************

Source code to get class object ???

*******************************************************
COMPLETE SOURCE CODE FOR : GetClassObject.java
*******************************************************


public class GetClassObject
{
public static void main(String[]args)
{
try
{
//This program will get class object for Object class
Class a=Class.forName("java.lang.Object");
}
catch(Exception exception)
{
exception.printStackTrace();
}
}
}


*******************************************************
JUST COMPILE AND EXECUTE IT
*******************************************************

How to know all method that contain in a java class file ???

How to know all method that contain in a java class file ???
Source code below will list all method that contain in java predefined class, named Object. For your information ,all java program will be subclass to Object class. If you write a java program, your java program will be subclass to Object class automatically. You may be, not see how it's happen but it is truly happen.

Related Posts Plugin for WordPress, Blogger...

I Also Can Create T-Shirt Logo For You