Planet JFX


118pages on
this wiki
Add New Page
Add New Page Talk0

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;

Also on Fandom

Random Wiki