Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

adding and removing Swing Component

 
Pavel Levap
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have this simple method: "http://pastebin.com/NidcAP6R" which determines myPanel content. In the case when myPanel should contains only ContactListPanel It works fine. But in the second case when myPanel should contains contactListPanel and unknowContactListView the problem occure- I can not see ContactListPanel in myPanel(I can se only ContactListPanel's TitledBorder....)
for clarificaton:
ContactListPanel extends Class1 and Class1 extends JScrollPane
UnknownContactPanel extneds JPanel.

Does anyone know how tro solve my problem, please?
Thanks in advance

 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pavel, welcome to the Ranch! We don't have too many rules here, but we do ask the you BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/awt-swing/52235-removing-adding-swing-components.html
 
Rob Camick
Ranch Hand
Posts: 2580
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post your SSCCE that demonstrates the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic