Java Jwindow not showing like before
Mostra commenti meno recenti
From Animsplash https://www.mathworks.com/matlabcentral/fileexchange/56760-animated-gif-splash-screen
The JWindow object is not able to show anymore. I'm using a transparent jwindow to house a gif as a loading screen for my app, but the window does not show. Manually running the code in the command window of r2020b isn't working like it did for r2019a. Can anyone please run this below code with an image you have laying around and see if you can get it to display? I just updated to r2020b and now it doesn't work for me.
win = javax.swing.JWindow;
win.setBackground(java.awt.Color(0,0,0,0));
html=strcat('<html><img src="file:./',YOUR IMAGE HERE,'"/></html>');
label = javax.swing.JLabel(html);
win.getContentPane.add(label);
win.setAlwaysOnTop(true);
win.pack;
%% set the splash image to the center of the screen
screenSize = win.getToolkit.getScreenSize;
screenHeight = screenSize.height;
screenWidth = screenSize.width;
% set Location
win.setLocation((screenWidth-500)/2,(screenHeight-500)/2);
win.show
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Call Java from MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!