I will provide the following code as well as the equation sub-program in an attachment (is a bit long).
The following is where I desire a calling device/listener/whatever to do what i want below it when the appropriate tag is selected:
public void actionPerformed(ActionEvent e)
{
if(e.getSource() instanceof JComboBox)
{
JComboBox selected = (JComboBox)(e.getSource());
//default drop-down menu option, does nothing other than set visibility to false on everything
if(selected == equationComboBox)
{
System.out.println("default option selected");
numberBox.setVisible(false);
numberField.setVisible(false);
variableBox.setVisible(false);
variableField.setVisible(true);
XCoordinateBox.setVisible(false);
XCoordinateField.setVisible(false);
YCoordinateBox.setVisible(false);
YCoordinateField.setVisible(false);
areaAnswerBox.setVisible(false);
areaBox.setVisible(false);
Compute.setVisible(false);
Clear.setVisible(false);
}
Attached File(s)
-
AreaSolverDisplay.txt (11.08K)
Number of downloads: 55 -
AreaSolverEquation.txt (747bytes)
Number of downloads: 41

New Topic/Question
Reply




MultiQuote





|