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); ]

Recommended Answers

All 4 Replies

That depends entirely on the constructors you have written for DisplayDie and DisplayPanel.

Signatures of each are:

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

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

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.

I have corrected, thank you for your assistance

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.