My program looks like this!
I want to have the bottom part dynamically load a frame into the bottom frame depending on the item selected in the ComboBox. For example, if the first item is selected I want a panel from the PresentValue.java file displayed. The idea is that I have one java file for each selection that displays what I design in its respective java file.
These two java files should be put into the "bottom" box from my first screenshot, depending on the selection from the combobox.
I'm more used to Android programming and there I would simple call the replace method from fragments to swap out the fragment loaded... looking for the analogy here.
final JComboBox selectorBox = new JComboBox(selection);
selectorBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
int selectionID = selectorBox.getSelectedIndex();
}
});
but cant find a way to do what I want to do. Please explain.