Change javascript to java calls to match javafx
Merge ../swing