Link to home
Start Free TrialLog in
Avatar of Omer-Pitou
Omer-Pitou

asked on

Java: Pass values from a Frame to a Dialog From

Hi Sirs,

I have a main frame and a dialog form which is called from the main frame with some key values from the main frame.
Here is my code from the main frame calling the dialog form. Unfortunately, those key fields come empty in the dialog form.
if (canProcessItem()) {
                MouvemComptaItems mouvemItems = new MouvemComptaItems(null, true);
                mouvemItems.setKeyAction(this.keyActionItem);
                mouvemItems.setKeyNumero(ef_numero.getText());
                mouvemItems.setKeyUserID(ef_userID.getText());
                mouvemItems.setKeyMonnaie(ef_codemonn.getSelectedItem().toString());
                mouvemItems.setKeyItemID(this.keyItemID);
                mouvemItems.setVisible(true);              
            }

Open in new window

Regards
Avatar of zzynx
zzynx
Flag of Belgium image

I don't get what you're trying to say.
What is your dialog and what is your main frame in that (too small) code snippet?
Avatar of Omer-Pitou
Omer-Pitou

ASKER

Let s say I have a frame1. on frame1 I have a button calling a dialog form.
The code above is executed when the user clicks on the button from frame1. It calls the dialog form, and on the dialog form, the ID Number is displayed, and that value comes from frame1.
i.e. frame1= Main UI for invoice processing
Dialog= Detailed lines of the invoice
ASKER CERTIFIED SOLUTION
Avatar of Omer-Pitou
Omer-Pitou

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK. That sounds way better to me ;-)
Btw, as far as I know, you can close this question by accepting your own comment as the answer.
Thanks
I passed my object as a parameter in the constructor of the called dialog form