Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with updating Panel!

 
George Kalfas
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo all,

I am working on an application and i am using AWT (because i don't know Swing!). My application has a Frame using BorderLayout and three Panels that are set in the WEST,SOUTH and CENTER positions of my Frame.The CENTER Panel has lots of other Panels inside.
My problem is this: If i press a button on the WEST Panel something comes up in my CENTER Panel.After i press a next button inside my CENTER Panel i want it to display some other stuff and completely wiping out the previous.In other words i want to update a certain Panel only.How am i going to do that?

I know my english isn't the best so if i'm not clear plz ask me!

Thanks a lot
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The simple answer to what I think you are asking is that you get a reference to the thing(s) you want to change and use it to call methods to make the changes. For example, in the demo app below, for class Blue to change the color of the colorPanel in class Red it needs a reference to class Red and uses this to call a method in Red to change the color. How you want to put things together (so they can communicate among themselves) is a matter of what works and what you're comfortable with. Trial and error and practice lead to success.
 
George Kalfas
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx a lot! U've been great help!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic