Well today we will try our hands on customized progress bar which you can use in your JFrames without any separate Progress Bar coming out to show the progress :)
Well let me provide you a screenshot of this Customized Progress Bar
In the above screenshot the JFrame's Components gets inactive and this appears above the JFrame
NOTE: Here Mouse Clicks are inactive in the JFrame till the Progress Bar in active
Let me provide you demo code of the above GUI, which will make easy to you understand and implement it in your projects
Lets begin ;)
Ahh, but before that download the API below is the link to download the API
Download API Here
Steps are as follows
- Import these JAR files in your project. I am using NetBeans to develop my demo code. Steps are provided to import APIs in your code using NetBeans
- Right click on your project name present on left Pane of Netbeans (Under which you have your .java files etc.
- Select Properties, in the Project Properties Frame select Libraries on left pane
- Click on Add Jar/Folder and select the above 2 JAR files
- You are done with importing API in your project
- Now comes the code well i am providing you screenshot of the code and below the screenshot will be details of the API
Now details about the API
- You can pass a String in 3 different ways
- InfiniteProgressPanel() -> This will display 14 bars circle without any text below it
- InfiniteProgressPanel(String text) -> This will display 14 bars circle with the text below it
- InfiniteProgressPanel(String text, int barsCount) -> This will display barsCount bars circle with text below it
- ipp.stop() -> will deactivate the Progress Bar
- You can dynamically change the Text below the circle, by below statements
- ipp.setText("XYZ");
- ipp.repaint();
Congrats now you can add customized Apple Style Progress Bar in your project :)
Thats it for this Post
Take Care
Peace
For Any Query mail me: ravjot.singh.28@gmail.com
I was looking for something like this. Thank you very much. And have a nice 2016 ;)
ReplyDelete