aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes cant reuse panel? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "cant reuse panel?" Watch "cant reuse panel?" New topic

cant reuse panel?

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i wrote this panel that contains an exit button:

with the idea that i could add it to several panels in order to reuse it, but it works only once

in my main app i have:

How can i turn this around?

[ March 25, 2007: Message edited by: miguel lisboa ]

java amateur
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
that was really helpful, Craig, ty!

from what i understand one has to use the button, not the panel that supports it, to add it to the various panels one wants it to be added to

one note: i'm using eclipse (and null layout for the main panels):
on the JavaBeans panel (when one uses the visual editor), the button appears with a white cross with red background, and more, does not show in visual editor pane (i mean, inside my app, near my lists, buttons and so on)
is there a way to fix it?

I agree. Here's the link:
subject: cant reuse panel?