@@ -42,6 +42,7 @@ public class StatusBar extends JPanel {
4242 private JLabel infoLabel = null ;
4343 private JProgressBar memStatus = null ;
4444 private JLabel errorLabel = null ;
45+ private JLabel errorLabelText = null ;
4546 private static StatusBar instance = null ;
4647
4748 /**
@@ -57,9 +58,14 @@ public StatusBar(boolean showMemory) {
5758
5859 errorLabel = new JLabel (new RedDotIcon ());
5960 errorLabel .setVisible (false );
60- errorLabel .setToolTipText ("An error has occurred. Please check the logfile." );
61+ errorLabel .setToolTipText ("An error has occurred. Please check the logfile (see README on GitHub for details) ." );
6162 rightPanel .add (errorLabel );
6263
64+ errorLabelText = new JLabel ("Error occurred!" );
65+ errorLabelText .setToolTipText ("An error has occurred. Please check the logfile (see README on GitHub for details)." );
66+ errorLabelText .setVisible (false );
67+ rightPanel .add (errorLabelText );
68+
6369 rightPanel .add (createMemoryStatus ());
6470
6571 JPanel iconPanel = new JPanel (new BorderLayout ());
@@ -85,6 +91,7 @@ public static StatusBar getInstance() {
8591 public void showErrorIndicator () {
8692 if (errorLabel != null ) {
8793 errorLabel .setVisible (true );
94+ errorLabelText .setVisible (true );
8895 }
8996 }
9097
@@ -162,7 +169,7 @@ public MemoryStatusUpdater(JProgressBar memStatus) {
162169 public void run () {
163170 try {
164171 while (true ) {
165- double factor = (int ) rt .totalMemory () / 100 ;
172+ double factor = (double ) ( int ) rt .totalMemory () / 100 ;
166173 int perc = (int ) ((rt .totalMemory () - rt .freeMemory ()) / factor );
167174 memStatus .setValue (perc );
168175 double usedMem = (rt .totalMemory () - rt .freeMemory ()) / 1024.0 / 1024.0 ;
0 commit comments