wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes while adding  different  components at same place Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "while adding  different  components at same place" Watch "while adding  different  components at same place" New topic

while adding different components at same place

yash bhatnagar

Joined: Dec 03, 2001
Posts: 16
I have some issues on my gui. while selecting values selected in the combobox components(comboboxes)have to be removed and has to add some other components(comboboxes) in that exact place. but, removing components is fine. but, while adding the same it's adding components to the gui is not working. because it's adding some where else.

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299

Kind of depends on what kind of layout you are using. It sounds like your add() methods are not the same? Are you using the same add() method for all your components? Could you post a little code? That may help.

Happy Coding,
Gregg Bolinger

GenRocket - Experts at Building Test Data
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
If it is always comboboxes removed and a combobox replacing it, why not just change the data within the combobox?
I agree. Here's the link: http://aspose.com/file-tools
subject: while adding different components at same place
Similar Threads
Table Oriented Programming
JSpinner text not updating
Problem with display of JComboBox
anyone got a good site for laout tips/howto ?
Change size of CardLayout