Parent frame handling events from a child frame
843807Sep 22 2007 — edited Sep 25 2007Hello, I'm making an app where i have a frame ("A" frame where A is a JFrame extended class) with a Button, nothing more nothing less, and, inside the mouseclick event I create an instance of another frame ("B" frame, created just by the common sentence B screenB = new B(); where B is a JFrame extended class) that it has, exactly like the parent, a Button but this has a different behavior, when i click the button of the "B" frame (Child) it's supposedly have to change the text of the button in "A" frame (Parent). In other words, an event in a child frame have to make changes in the parent frame, or the parent have to listen to events of the child to make any changes at the moment it happened, or whatever, what you understand the best for this.
And another thing, in some apps you have a screen to fill some fields, and when you click a button or something, sometimes it appears another screen, let's say it has more fields, but that screen is now on the top of the screens and unless you close it or click a Ok button for say something, it denies you to do anything on the parent screen or another screen, like that are disabled or something. This is a property included in Frames, or it has to be imaginated and coded in java?
Hope you can help me.