Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

split component and communication

 
mark smith
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i tried to split every area of a program.

I have a main class (Main.java) who extends JFrame.

Main class containt a left panel who contain two panels. The first one (Component) contain many TabelPanel and the second is named Property.

I have a center panel (design) and a bottom panel who contain a button. The design panel contain a jtree.

I take element from component panel and a do drag and drop to jtree. When i select a element in the jtree, i need to display information to the property panel.

When i click in the bottom (bottom panel), i need to iterate to jtree panel.

Instead to have reference everywhere, what is the best way to avoid that?

thanks
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites (link).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic