If I run my program. a GUI shows.
clicking the combox. calls a series of classes that produce what text needs to be in the textfields
so one of the classes calls fillSetters which is in a class that extends the GUI so "this" should be an instance of the GUI.

could someone who knows OOP show me how to minipulate my GUI without creating a new one.
nothing goes into the text fields.

I put all 4 classes 1600 lines of code into the GUI and it worked. I don't want it that way though.

public void fillTextBox(){


    public void showKey(KeyCards kc) {

     public void initTextFields(KeyCards kc) {
        kc.sigTxt = new JTextField();

8 Years
Discussion Span
Last Post by ceyesuma

Sorry to break this to you, but it isn't OOP if you don't use objects.

It might help to see more code, then again, if you are creating new textfields every time you want to place a value in one, that is your problem, and judging by the name of the first method that appears to be what you are doing.


Ok I really don't know.

I run the program and a class keycard.java creates a gui with a combobox an 51 text fields and labels.

I leave that class when the combo box is selected.

I can never go back to that class because if I do I have to use
KeyCards kc = new KeyCards(); which create What?


Actually I already know that that creates a new keycards object.

what I don't understand is how to set the text fields in the orignal keycard object from another class.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.