Re: Using setText() to update the displayed string in a JTextField

What are you doing wrong; I can detect a few things:

I wonder if "fp" is a class and not a variable that refers to a class. If so, please remember that class names should all begin with an upper-case letter, and field, variable, and method names lower case. This may seem like a minor quibble but it becomes very important when you ask others to read over and interpret your code.

You appear to be using static fields in your fp class. If so, don't. Make all of your fields private and instance fields, and reserve use of static fields for situations where this makes sense (it doesn't here).

All of your class's fields should be private with few exceptions. You should limit interaction with them through public methods, and these only when necessary.

Again, you should give your GUI class public methods that allow other classes to change its state, or "setter" methods. For instance you could give your GUI class above a setText(int index, String text) method that allows you to set the i'th text field.