Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private Button1 As Button
Private Pane1 As Pane
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
Dim path As String = GetSystemProperty("user.home", "")
Button1.Initialize("Button1")
Pane1.Initialize("Pane1")
MainForm.RootPane.AddNode(Button1, 50,50,100,100)
MainForm.RootPane.AddNode(Pane1, 50,350,100,100)
If File.Exists(path & "\Pictures","incredibles.png") Then
CSSUtils.SetBackgroundImage(Button1,path & "\Pictures","incredibles.png")
CSSUtils.SetBackgroundImage(Pane1,path & "\Pictures","incredibles.png")
End If
CSSUtils.SetBorder(Button1,2,fx.Colors.Blue,10)
CSSUtils.SetStyleProperty(Button1,"background-repeat","stretch")
CSSUtils.SetStyleProperty(Button1,"-fx-background-radius","8")
CSSUtils.SetBorder(Pane1,2,fx.Colors.Blue,10)
CSSUtils.SetStyleProperty(Pane1,"background-repeat","stretch")
MainForm.Show
End Sub