?
Solved

removing component from Container

Posted on 2005-03-09
10
Medium Priority
?
219 Views
Last Modified: 2010-03-31
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
Comment
Question by:komlaaa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 92

Expert Comment

by:objects
ID: 13501964
inclusive
0
 

Author Comment

by:komlaaa
ID: 13501977
Do u know if that is apply to JPanel also?
0
 

Author Comment

by:komlaaa
ID: 13501990
Or how to remove lets say a JTable from a JPanel?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 92

Accepted Solution

by:
objects earned 1200 total points
ID: 13502041
0
 

Author Comment

by:komlaaa
ID: 13502176
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
 

Author Comment

by:komlaaa
ID: 13508005
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
 
LVL 92

Expert Comment

by:objects
ID: 13510603
> 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
 

Author Comment

by:komlaaa
ID: 13510707
>>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
 
LVL 92

Expert Comment

by:objects
ID: 13510733
A JPAnel is a subclass of Container.
0
 

Author Comment

by:komlaaa
ID: 13510751
oh, ok thanks
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month9 days, 6 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question