posted 15 years ago
Hello All,
I'm trying to to modify an existing class in a large application. The problem I am running into trying to convert an existing text box into a combo box when a user clicks on a button. The code right now uses a grid layout. I tried to just add the combo box in the method that creates the panel with .setVisible(false), thinking that when the listener for the button is selected I can set it to true. However, what happens is the formatting of the panel shifts everything over even if the combo box is invisible. The reason I am changing the text box into a combo box in the first place is that there is a certain scenario where the user needs to edit this panel and then processes the values when the button is selected. It is only in this panel that the button can be selected. Other parts of the application can insert data in the text box for display, hence the reason why I can not change the text box into a combo box.
I would appreciate any help or pointers anyone can give me on this. I've pretty much exhausted all resources here. Last resort is to just build the panel in the button listener method, which is really not an elegant solution.
Thanks for your help,
Jerome