I am in the process of creating a Java app and would like to have a bar on the bottom of the app, in which I display a text bar and a status (progress) bar.
Only I c
I have used swing library from L2FProd. The Status bar library they have provided is very good.
Below is how you would use it:
The status bar internally divides the bar area into zone. Each zone can contain a Component (JLabel, JButton, etc). Idea is to fill the bar with required zones and the components.
Instantiate the status bar as below....
import java.awt.Component;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import com.l2fprod.common.swing.StatusBar;
StatusBar statusBar = new StatusBar();
statusBar.setZoneBorder(BorderFactory.createLineBorder(Color.GRAY));
statusBar.setZones(
new String[] { "first_zone", "second_zone", "remaining_zones" },
new Component[] {
new JLabel("first"),
new JLabel("second"),
new JLabel("remaining")
},
new String[] {"25%", "25%", "*"}
);
Now add the above statusBar to the main panel you have (BorderLayout and set it to the south side).
See a sample screenshot from one of the apps I am working on here (it has 2 zones). Let me know if you face any issues....