i have jst started programing in java m beginer.
m making gui which contains a two radio button a slider and a text message.
although its compiling coreectly but it doesnot display any thing
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class GUI
{
JFrame frame;
JLabel coord;
JRadioButton Man=new JRadioButton("man");
JRadioButton Woman= new JRadioButton("woman");
JSlider slider;
public void initGUI()
{
frame=new JFrame();
Container cont=frame.getContentPane();
cont.setLayout(new BorderLayout());
cont.add(Man);
cont.add(Woman);
cont.add(slider);
JTextField numberEnter = new JTextField("ideal weight is:", 20);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(300,300);
frame.setVisible(true);
}
public static void main (String arg[])
{
GUI g=new GUI();
}
}