### Create ImagePattern

Creating an ImagePattern can be accomplished by using JavaObjects.
There are two objects required: One for the ImagePattern and one for the Circle the ImagePattern is filled in.
`Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
Dim ip As JavaObject
Dim img As Image = fx.LoadImage(File.DirAssets, "asteroids.png")
ip.InitializeNewInstance("javafx.scene.paint.ImagePattern", Array(img))
Dim circle As JavaObject
Dim radius As Double = 100
circle.InitializeNewInstance("javafx.scene.shape.Circle", Array(radius))
circle.RunMethod("setFill", Array(ip))
MainForm.RootPane.AddNode(circle, 100, 100, 200, 200)
MainForm.Show
End Sub`

Changed: , Category: Image and ImageView, File: T6C199M1461.htm, ID: 1461