Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/splash
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7581/src/net/sourceforge/bprocessor/gui/splash
Modified Files:
SplashWindow.java
Log Message:
added progressbar to the splash screen! (updates a little to fast to see though)
Index: SplashWindow.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/splash/SplashWindow.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SplashWindow.java 21 Oct 2005 08:42:47 -0000 1.1
--- SplashWindow.java 26 Nov 2006 22:13:47 -0000 1.2
***************
*** 16,19 ****
--- 16,20 ----
import javax.swing.ImageIcon;
import javax.swing.JLabel;
+ import javax.swing.JProgressBar;
import javax.swing.JWindow;
***************
*** 22,25 ****
--- 23,32 ----
*/
public class SplashWindow extends JWindow {
+
+ /**
+ * the progress bar
+ */
+ private JProgressBar pb;
+
/**
* Constructor for the SplashWindow
***************
*** 33,37 ****
--- 40,47 ----
URL url = cl.getResource(iconname);
JLabel l = new JLabel(new ImageIcon(url));
+ pb = new JProgressBar();
+ pb.setMaximum(100);
getContentPane().add(l, BorderLayout.CENTER);
+ getContentPane().add(pb, BorderLayout.SOUTH);
pack();
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
***************
*** 43,45 ****
--- 53,66 ----
labelSize = null;
}
+
+ /**
+ * increments the progressbar.
+ */
+ public void increment() {
+ if (pb != null) {
+
+ pb.setValue(pb.getValue() + 10);
+ }
+
+ }
}
|