0

I am applying a JAVA application with Matlab. When I test my program in Eclipse, everything is fine, the progress bar is showing in desired color. But when I call this JAVA application(through jar file) from Matlab. The progress bar is all green, I am struggling in this situation, I do not know where is the problem as everything is fine when I run it without Matlab.

enter image description here

JProgressBar progressBarFirstSubjectNeuralSignal;
UIDefaults defaultsFirstSubject = new UIDefaults();


defaultsFirstBar.put("ProgressBar[Enabled].foregroundPainter", new 
CustomPainter(Color.RED));

defaultsFirstBar.put("ProgressBar[Enabled+Finished].foregroundPainter", new 
CustomPainter(Color.RED));

progressBarFirstBarSignal.putClientProperty("Nimbus.Overrides.InheritDefaults", Boolean.TRUE);   
progressBarFirstBarSignal.putClientProperty("Nimbus.Overrides", defaultsFirstSubject);  
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
DarkSoul
  • 11
  • 2
  • For better help sooner, post a [MCVE] or [Short, Self Contained, Correct Example](http://www.sscce.org/). – Andrew Thompson Jun 23 '18 at 13:31
  • You can provide a custom UI for your progress bar based on the `BasicProgressBarUI`, which paints using your color and ignores all UI settings that may be performed by Matlab. – Sergiy Medvynskyy Jun 23 '18 at 13:40

0 Answers0