Q:

How to change the size of the JButton?

Here is my code. The button is the same size as the FlowLayout. How can I make the button smaller? 
public class javalearning extends JFrame{{

    FlowLayout f = new FlowLayout();
    this.setSize(600,600);

    JFrame j = new JFrame();
    this.setTitle("this is a tittle");

        JButton button = new JButton();
        button.setText("Button");
        this.add(button);
        button.setBounds(10, 10, 10, 10);

        this.setVisible(true);  
    }
}

A:

I think you forget to setLayout, it works fine when I do. Don't use setBounds and put it in a javalearning constructor and I also suggest you setDefaultCloseOperation like
public javalearning() {
    FlowLayout f = new FlowLayout();
    this.setLayout(f);
    this.setSize(600, 600);
    this.setTitle("this is a tittle");
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JButton button = new JButton();
    button.setText("Button");
    this.add(button);
    // button.setBounds(10, 10, 10, 10);

    this.setVisible(true);
}

public static void main(String[] args) {
    javalearning m = new javalearning();
}

Finally, by convention, Java class names start with a capital letter and are camel case. Something like JavaLearning would follow that convention.

A:

You never set the layout manager (FlowLayout) to the frame, therefore the JFrame is still using it's default layout manager of BorderLayout...
Try using something more like...
FlowLayout f = new FlowLayout();
setLayout(f);
this.setTitle("this is a tittle");

JButton button = new JButton();
button.setText("Button");
this.add(button);

this.pack();
this.setVisible(true);  

instead...
Take a closer look at Laying Out Components Within a Container for more details

