Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private Button1 As Button
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Stylesheets.Add(File.GetUri(File.DirAssets, "style.css"))
Button1.Id="button1" ' Set ID here
MainForm.Show
End Sub
'Create a style.css file
'Using id selector
#button1:pressed {-fx-background-color: yellow;}