DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   Passing Info Between Forms (http://www.daniweb.com/forums/thread119098.html)

tro Apr 14th, 2008 1:57 pm
Passing Info Between Forms
 
I am passing information between two forms. Up to now, I have passed information from one form to another. Is there another way to do this?

[DisplayDie dpDie = new DisplayDie(dp); // Getting constructor error in this line
DisplayPanel dp = new DisplayPanel(dpDie,dpDie);]

When I swap the lines, error moves to top line.

[DisplayPanel dp = new DisplayPanel(dpDie,dpDie); // Getting constructor error in this line lineDisplayDie dpDie = new DisplayDie(dp); ]

Ezzaral Apr 14th, 2008 2:14 pm
Re: Passing Info Between Forms
 
That depends entirely on the constructors you have written for DisplayDie and DisplayPanel.

tro Apr 14th, 2008 4:07 pm
Re: Passing Info Between Forms
 
Signatures of each are:

[public DisplayPanel(final DisplayDieInterface l, final DisplayDieInterface r){...]

[public DisplayDie( final DieDisplayInterface s){ ..]

Ezzaral Apr 14th, 2008 4:40 pm
Re: Passing Info Between Forms
 
You have both DieDisplayInterface and DisplayDieInterface shown there - which is it?

The fact that the confusion arose at all is a clear sign that you should consider a better name for the interface. Is there more than one class that implements the interface? If not, will there be? If both answers are no then you don't even need a separate interface definition.

tro Apr 14th, 2008 6:14 pm
Re: Passing Info Between Forms
 
I have corrected, thank you for your assistance


All times are GMT -4. The time now is 5:55 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC