Widget[class:class|path|URL[path],{content}]
defines a new widget instance.
Widget
Widget[class:class|path|URL[path],{content}]
defines a new widget instance.
Details and Options
- To use Widget, you first need to load GUIKit using Needs["GUIKit`"].
- The following options can be given:
-
InitialArguments None a list of arguments to use in the constructor for this widget instance Name None a name with which to register this instance in the widget registry ExposeWidgetReferences Automatic a list of widget names to expose from an internal definition
Examples
open all close allBasic Examples (1)
Needs["GUIKit`"]ref = GUIRun[Widget["Panel"]]GUIScreenShot[ref]Explicitly specify what Java class to use:
ref = GUIRun[Widget["class:javax.swing.JPanel"]]GUIScreenShot[ref]Specify constructor arguments:
ref = GUIRun[Widget["Label", { "text" -> "Hello World!"}]]GUIScreenShot[ref]Options (2)
InitialArguments (1)
Needs["GUIKit`"]ref = GUIRun[Widget["Label", InitialArguments -> { "Hello World!"}]]GUIScreenShot[ref]Name (1)
Needs["GUIKit`"]ref = GUIRun[Widget["Frame", {
Widget["Panel"]},
Name -> "myFrame"] ]ref@SetPropertyValue[{"myFrame", "title"}, "My Title"]The interface has been resized to display the entire title:
GUIScreenShot[ref]See Also
Related Guides
Text
Wolfram Research (2007), Widget, Wolfram Language function, https://reference.wolfram.com/language/GUIKit/ref/Widget.html.
CMS
Wolfram Language. 2007. "Widget." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GUIKit/ref/Widget.html.
APA
Wolfram Language. (2007). Widget. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GUIKit/ref/Widget.html
BibTeX
@misc{reference.wolfram_2026_widget, author="Wolfram Research", title="{Widget}", year="2007", howpublished="\url{https://reference.wolfram.com/language/GUIKit/ref/Widget.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_widget, organization={Wolfram Research}, title={Widget}, year={2007}, url={https://reference.wolfram.com/language/GUIKit/ref/Widget.html}, note=[Accessed: 15-June-2026]}