Advance JAva-Jframe Form Designing sample Code
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.Color;
public class Sample extends JFrame
{
public Sample()
{
setTitle("Home");
getContentPane().setBackground(Color.orange);
setSize(300,200);
setLayout(null);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLocation(100, 100);
JLabel l0=new JLabel("Registration");
l0.setBounds(10,0,100,20);
add(l0);
JLabel l1=new JLabel("Enter Name");
l1.setBounds(30,20,100,20);
add(l1);
JTextField textFieldUserName = new JTextField(50);
textFieldUserName.setBounds(110,20,60,20);
add(textFieldUserName);
JButton b1=new JButton("Click Me");
b1.setBounds(30,100,100,20);
add(b1);
JLabel l2=new JLabel("Select city");
l2.setBounds(30,50,100,20);
add(l2);
JComboBox c1=new JComboBox();
c1.addItem ("pune");
c1.addItem ("Nagar");
c1.addItem ("Nasik");
c1.setBounds(110,50,100,20);
add(c1);
setVisible(true);
}
public static void main(String s[])
{
Sample obj=new Sample();
}
}