Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

removing component from Container

Hi Experts,

what is the interval of index in the method below? from 0 inclusive or exclusive?

================================
public void remove(int index)Removes
the component, specified by index, from this container.
Parameters:
index - the index of the component to be removed.
0
komlaaa
Asked:
komlaaa
  • 6
  • 4
1 Solution
 
objectsCommented:
inclusive
0
 
komlaaaAuthor Commented:
Do u know if that is apply to JPanel also?
0
 
komlaaaAuthor Commented:
Or how to remove lets say a JTable from a JPanel?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
komlaaaAuthor Commented:
i look up there already, but it didn't say anything about the range thats why i asked
Also,
i am not about how to remove lets say a JTable from a JPanel.
that is why i asked
0
 
komlaaaAuthor Commented:
Can someone help out with this question?

I know Container.remove(int index)  will revove a component at that index from the Container.
MY QUESTION IS: How can i remove a component(lets say a JTable or JComboBox  from a JPanel)
0
 
objectsCommented:
> but it didn't say anything about the range thats why i asked

what range are you talking about

> How can i remove a component(lets say a JTable or JComboBox  from a JPanel)

I posted the method above to remove *any* component
0
 
komlaaaAuthor Commented:
>>I posted the method above to remove *any* component
that remove method only remove conmponent from a *Container*
I am asking if there way to remove a component from a *JPanel*
0
 
objectsCommented:
A JPAnel is a subclass of Container.
0
 
komlaaaAuthor Commented:
oh, ok thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now