0

Hi All

I have a about java. and my question is i have a window open and in that window there is a add button when user click on the add button then a form window opens up and in that form window user can input anything thing want and after they finish they need to click on the "add" button to add all that info. but what i want is when user click "add" button on the form i need to show that info on the first window screen. any help please.

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Ezzaral
0

The second window will have a conwstructor that will take as argument the first window:

public Frame2 (Frame1 f1)

The Frame1 (first window) will have variables that will take value from the second window when you click 'Add'. When you click 'Add' from the second window you will give values to the f1 variables. These variables could be type JTextField so at first they will be blank and then after 'Add' they will display what you get from second window

0

He is saying that frame2 will need a reference to frame1. Your add button code will need to call methods on frame1 to set the data that you wish to display.

This topic has been dead for over six months. 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.