Java Swing Alternatives

Java Swing Alternatives for MATLAB Apps

javacomponent has been an undocumented function in MATLAB® since R14. This function, along with the figure JavaFrame property, extend the ability of MATLAB apps. However, over the past several releases, documented MATLAB functions and features have been added that replace the need for the javacomponent function and the JavaFrame property. The following table lists some of the most common capabilities that you can now achieve using documented functions and features. Users are encouraged to update their code to use these documented alternatives to ensure compatibility with future MATLAB releases.

If you still require the javacomponent function or JavaFrame property, please complete one of our online surveys to help us better understand your usage. Each survey takes approximately 1-2 minutes to finish.

Documented MATLAB Alternatives

Feature
Documented Functionality
Available As Of
With

UI tabs

uitabgroup and uitab functions

R2014b

figure objects

uifigure objects

Spinners

uispinner function

R2016a

uifigure objects

Editable combo boxes

uidropdown function

R2016a

uifigure objects

Trees

uitree function

R2017b

uifigure objects

Date pickers

uidatepicker function

R2018a

uifigure objects

Figure maximize or minimize

WindowState property

R2018a

figure objects

uifigure objects

Layout managers

uigridlayout function

R2018b

uifigure objects

Scrollable containers

Scrollable property on uifigure and containers

R2018b

uifigure objects

Menu tooltips

Tooltip property on UIMenu components

R2018b

uifigure objects

UI table sorting

ColumnSortable property on UITable components

R2019a

uifigure objects

Image icons and branding

uiimage function

R2019a

uifigure objects