wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes remove method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "remove method" Watch "remove method" New topic
Author

remove method

memati bas
Ranch Hand

Joined: Jan 29, 2006
Posts: 85
Hi,
Would anyone please explain how to use remove method ??
For example what sholud I use in its parameters ?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Hi,

The remove method of what class?


[Jess in Action][AskingGoodQuestions]
memati bas
Ranch Hand

Joined: Jan 29, 2006
Posts: 85
JPanel class
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

There are two different ones; the more useful one takes the Component to be removed as an argument. So if there's a JButton in a JPanel, and you want to remove it, just call "panel.remove(button)".

After removing components from a panel that's already visible on screen, you must call "validate()" on the panel to get it to fix up the layout.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: remove method
 
Similar Threads
JTable
session variable
HFE "Brain Power" on p. 269
Removing from a ArrayList while iterating over it
Need your help