Polymorphism JavaFX

70 views
Skip to first unread message

cworley420

unread,
Jul 23, 2008, 4:06:45 PM7/23/08
to javafx


First does polymorphism exist in javaFX? I could not really fine any
examples on the site.

What I am trying to do is abstract out some of my GUI components. I
have a javafx file named Action.fx with a class defined in it. Later
I will have a list of actions and in the guil create a list of buttons
for each action. I want to do this through the Action interface. The
name attribute is just one example. But, i want to have operations.
Just as in Java I would implement methods to do this.

class Action {
attribute name;

operation getIcon() { }
}

class WizardAction extends Action {
attribute name = "Wizard"
operation getIcon() {
// return icon for wizard
}
}

The error I get is in WizardAction saying Action does not exist. it
is imported.
Can someone help me under stand how I can accomplish this. --or show
me some documentation on this.
Reply all
Reply to author
Forward
0 new messages