need an interface for a recursion algorithm program

i need some help to finish my assignment

following is the code

i want the main method to get an user input, it should be a GUI, since i don;t know swing i find it hard , please help me.. regards.. i want the interface to get a single integer and buttons to compute, factorial, triangle and partaily by giving a nother value to compute permutation or combination

import java.io.*;

class fcp

{

int factorialGen(int x){

int temp;

if(x==0){

temp=1;

}else if(x==1){

temp=1;

}else{

temp=x*factorialGen(x-1); //recurtion of function;

}

return temp;

}

int combination(int n,int r){

int x = factorialGen(n)/(factorialGen(r)*factorialGen(n-r));

return x;

}

int permutation(int n,int r){

int x = factorialGen(n)/factorialGen(r);

return x;

}

void triangle(int x){

for(int n=0;n<=x;n++){

for(int j=x;j>=0;j--){

System.out.println(" ");

}

for(int r=0;r<n;r++){

combination(n,r);

}

}

System.out.println("\n");

}

void pascalTrianglefactorial(int x){

System.out.println("The factorial value is"+factorialGen(x));

triangle(x);

}