You are pretty close. All you need is to create the JButton based upon user input, then add that button to the user interface.
i = Integer.parseInt(JOptionPane.showInputDialog("Enter the number of jButtons you need"));
for ( int j = 0; j < 5; j++ ) {
//Now, i want to create 5 jButtons
String k = JOptionPane.showInputDialog("Enter the numbers you want to set as the jButton"+ i + "'s text");//no direct need to parse the int
JButton button = new JButton(k);
//add the button to the GUI
//Now, numbers the user enters must be set as the ith jButton's text!
}
If you want the button to do something, you will also need to add a Listener to the button. If you are unfamiliar with adding components to a GUI and/or using swing component Listeners, I recommend reading the online tutorials at Sun (such as
How to use Buttons). GUI builders are convenient, but IMO one should know the fundamentals of arranging a GUI and actions associated with that GUI.