TheRealDels
Programmer
Hi, I'm building a FiloFax program to store everyday needed information.
I've subclassed JPanel into a JPanLogon, JPanAddress, JPanBookmarks. Each of which is JPanel with text boxes etc that captures information I use daily, they all look different and store different information.
I was using them in my FiloFax program, having a JComboBox at the top and a JPanel below. Depending on which type of information was chosen to be looked at in the combo, the JPanel below would be assigned to either of my subclasses.
Problem :
I can assign one of my subclasses to this JPanel during the constructor with = new JPanLogon() etc.
However, I can't dynamically change this, ie in the JComboBox change algorithm, I have tried,
= new JPanAddress(); which doesn't produce an error but it doesn't diplay the other JPanel.
Why ???
+ Is using one JPanel as the housing for one of a set of JPanel subclasses or objects the best way or should I create multiple JPanel objects in the same place and toggle the view attributes on them ?
I've subclassed JPanel into a JPanLogon, JPanAddress, JPanBookmarks. Each of which is JPanel with text boxes etc that captures information I use daily, they all look different and store different information.
I was using them in my FiloFax program, having a JComboBox at the top and a JPanel below. Depending on which type of information was chosen to be looked at in the combo, the JPanel below would be assigned to either of my subclasses.
Problem :
I can assign one of my subclasses to this JPanel during the constructor with = new JPanLogon() etc.
However, I can't dynamically change this, ie in the JComboBox change algorithm, I have tried,
= new JPanAddress(); which doesn't produce an error but it doesn't diplay the other JPanel.
Why ???
+ Is using one JPanel as the housing for one of a set of JPanel subclasses or objects the best way or should I create multiple JPanel objects in the same place and toggle the view attributes on them ?