• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

close panel

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

on panel, i have a JTabbedPane

On this JTabbedPane, i have 2 panel



in the EntityInfoPanel, i have a button i would like to close my EntityPanel

i do



but that close only the JTabbedPane not EntityPanel

how to do it?

thanks
 
Rob Camick
Ranch Hand
Posts: 2619
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Panels don't close. That something JFrames and JDialogs do.

So I'm guessing your looking for:

 
mark smith
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my error... EntityPanel is on JDialog...

so in the button event of EntityInfoPanel i do: this.getTopLevelAncestor().setVisible(false); //a

i put an addWindowListener on the JDialog, windowClosing is not never called..... i thinking i could called after line //a
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic