Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Swing / AWT / SWT
Removing Objects from a Custom Layout
Chris Baty
Ranch Hand
Posts: 30
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Guys,
I created my own custom LayoutManager, which works okay. But now I want to remove a button when it's been clicked. Has anyone ever implemented removeLayoutComponent(Component)? I'm just looking for an example.
Thanks.
Chris
Rob Spoor
Sheriff
Posts: 22781
131
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
All you need to do is undo all you've done in addLayoutComponent. So how about you show us that method?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
Rob Camick
Rancher
Posts: 3324
32
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Look in the
Java
source code that comes with the JDK. I believe the file name is src.zip, so just unzip it and you have access to all the classes.
Chris Baty
Ranch Hand
Posts: 30
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
@Override
public void addLayoutComponent(Component arg0, Object arg1) {
// TODO Auto-generated method stub
}
Rob Spoor
Sheriff
Posts: 22781
131
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
If your layout manager doesn't have any of its own administration then it's not necessary to do any cleanup. Just keep the method empty.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to Uncheck the checkbox
Dynamic Connection Pool
how to cast JSF SelectItem back to original type?
IFrame inside a window
Default value for body-content inside tld
More...