B4X Store
jdashboardUI / Core & Utilities / JGlassPanel
Core & Utilities

JGlassPanel

Decorative translucent surface with configurable color, border and radius.

Search all jdashboardUI docs
Source
jdashboardUI.b4xlib · Public API only
Store language: en

JDashboardUI · Complete API guide · B4J/JavaFX · October 30, 2026 source bundle

Translucent decorative panel with radius, color, transparency, border, blur, child content and click event.

Illustrative component mockup for JGlassPanel

Illustrative documentation mockup, not an exact control screenshot.

What it does and when to use it

Translucent decorative panel with radius, color, transparency, border, blur, child content and click event.

Initialization and practical examples

The example demonstrates the available operations. Root, where used, refers to an existing B4XView. Example image files must actually be included in the project's Files folder.

' A translucent card created from code
Private Glass As JGlassPanel
Glass.Initialize(Me, "Glass")
Glass.AddToParent(Root, 24dip, 24dip, 340dip, 190dip, 18dip)
Glass.GlassColor = xui.Color_White
Glass.Transparency = 0.12
Glass.BlurRadius = 12
Glass.BorderColor = xui.Color_ARGB(110,255,255,255)
Glass.Visible = True

' Add a child view
Dim Lbl As Label
Lbl.Initialize("")
Lbl.Text = "Revenue overview"
Glass.Panel.AddView(Lbl, 12dip, 12dip, 240dip, 35dip)

Private Sub Glass_MouseClicked
    Log("Glass panel clicked")
End Sub

Complete public API reference

This module exposes 16 public methods/accessors in the inspected version. All declarations, including variants, getters/setters and Designer lifecycle hooks, appear below.

Exact source declaration Purpose
Initialize(Callback As Object, EventName As String) Initializes the instance and, when required, binds Callback and EventName.
AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int, radius As Int) Inserts the control into Parent with geometry and initial options.
DesignerCreateView(Base As Object, Lbl As Label, Props As Map) Designer lifecycle hook; not called manually.
setBlurRadius(Value As Int) Configures BlurRadius; single-argument setters commonly use B4X property syntax.
Clear Clears the panel via the public Clear operation.
getCornerRadius As Int Reads the CornerRadius property.
setGlassColor(Value As Int) Configures GlassColor; single-argument setters commonly use B4X property syntax.
getGlassColor As Int Reads the GlassColor property.
setBorderColor(Value As Int) Configures BorderColor; single-argument setters commonly use B4X property syntax.
getBorderColor As Int Reads the BorderColor property.
getBlurRadius As Int Reads the BlurRadius property.
setTransparency(Value As Float) Configures Transparency; single-argument setters commonly use B4X property syntax.
getTransparency As Float Reads the Transparency property.
setVisible(Visible As Boolean) Configures Visible; single-argument setters commonly use B4X property syntax.
getVisible As Boolean Reads the Visible property.
getPanel As B4XView Reads the Panel property.

B4X properties: read/write access

Public getX/setX members correspond to standard B4X Control.X property syntax when their signatures are property-compatible. Use multi-argument members as methods.

Property Access
BlurRadius read / write
CornerRadius read
GlassColor read / write
BorderColor read / write
Transparency read / write
Visible read / write
Panel read

Public fields

  • mBase As B4XView

Designer properties

  • CornerRadius
  • GlassColor
  • BlurRadius
  • Transparency
  • BorderColor

Events

  • MouseClicked

Lifecycle, compatibility and limitations

The final appearance depends on the background. The SVG mockup is illustrative rather than an exact JavaFX screenshot.

DesignerCreateView and Base_Resize, where listed, are Custom View lifecycle hooks managed by B4J. Normally you should not call them manually. When adding the view through the Designer, do not initialize the same instance again.

API conventions

  • All signatures and argument types come from the inspected source bundle.
  • B4XView denotes an XUI view, B4XFont an XUI font, and Object an arbitrary value.
  • Variable names in samples are illustrative: use those from your actual project.
  • Source review was performed; no real B4J compilation was performed in this environment.