ok im trying to write a program that will take 3 numbers the use inputs and then the program will rearrange them from lowest to highest. Heres the code i have so far and it doesnt work....

import javax.swing.JOptionPane;
public class Program_4 {
public static void main(String [] args) {
int x,y,z;
double order1, order2, order3;
x = Integer.parseInt(JOptionPane.showInputDialog("What s the first number?"));
y = Integer.parseInt(JOptionPane.showInputDialog("What s the second number?"));
z = Integer.parseInt(JOptionPane.showInputDialog("What s the third number?"));
order1 = 1;
if ( x < y && y < z && x < z){
order1 = x;
order2 = y;
order3 = z;
}
else if ( x < y && y > z && x < z) {
order1 = x;
order2 = z;
order3 = y;
}
else if ( x > y && y < z && x < z) {
order1 = y;
order2 = x;
order3 = z;
}
else if ( x > y && y < z && x > z)
order1 = y;
order2 = z;
order3 = x;
}

JOptionPane.showMessageDialog(null,"Fist " + order1);
JOptionPane.showMessageDialog(null,"Second " + order2);
JOptionPane.showMessageDialog(null,"Third " + order3);
}
}