Your Factorial class should have nothing to do with the GUI - its sole purpose should be to compute the factorial of a number.
You should follow the instructions and create a Factorial class with an instance variable named factorial:
Incidentally, why do you include one in your factorial computation loop? x*1 is always x.
You might consider using a long instead of an it.
Then you create a GUI driver that extends JPanel.