File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Swing/JButton/JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Swing/JButton/JPanel" Watch "Swing/JButton/JPanel" New topic



Joined: Jul 05, 2001
Posts: 5
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
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . 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.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

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.
- satya

Take a Minute, Donate an Hour, Change a Life
I agree. Here's the link:
subject: Swing/JButton/JPanel
It's not a secret anymore!