Planet JFX


118pages on
this wiki
Add New Page
Talk0 Share

This is simple example of a button using javafx.ui.PopupMenu by Christopher Oliver, 22-May-2007, openjfx users ML that works in JFXPad.


import javafx.ui.*;
import javafx.ui.canvas.*;

Button {
     text: "Click Popup"
     var: self
     var popup = PopupMenu {
         x: 0
         y: bind self.height
         owner: self
         items: foreach (i in [1..3])
         MenuItem {
             text: "Item {i}"
     action: operation() {
         popup.visible = true;

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki