Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing/JButton/JPanel

 
Sonara
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello Sir ,
I am really happy with the replies with what i get.
It works perfectly for me.Thanks a lot.
One More problem, i have panel1.
Panel1-North has Panel2(panel2 has 5 buttons).
Panel1-center has Panel3.
when each button is pressed i have add a panel(which is different for each 5 buttons say p1,p2,p3,p4,p5) ,but all to Panel3.
one common Panel-panel3 but when button pressed different panels to be added only to panel3.
when 1st button is pressed i add p1 to panel3.
when 2nd button is pressed i give jpanel3.removeAll() & then add p2 to panel3.
But removeAll doesn't work .
When button is pressed i need the respective panels to be displayed & other should be removed.
pl suggest me a solution.
excepting u'r reply today itself.Pl... sir.
with regards
Sonara.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Sonara",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"sonara":
I hate to say this but looks like you don't
respect what is being repeatedly requested.
Please consider this to be the last request
from the javaranch moderators.
Please do re-register with a proper name as suggested.
Thanks for your cooperation.
regds.
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic