I have make this demo testing code but when ever i run this code the button covers whole frame and i have even tried SetBound method but still it do not work
package com.Testing.Java;
import javax.swing.*;
import java.awt.*;
public class Main {
public static void Simple(){
JFrame f=new JFrame();
JButton b=new JButton("Click");
b.setBounds(100,100,100,100);
f.add(b);
f.setSize(400,500);
f.setVisible(true);
f.setLayout(null);
}
public static void main (String args[]){
Simple();
}
}
` - just indent the code (as you already had) and Markdown will take care of the rest.
– Jon Skeet Mar 18 '16 at 13:31