General discussion

Locked

how to set status bar in java

By kranthi_aish ·
i would like to know the status of the application while it is opening or running
i am not discussing here about java progressBar
i am interested more in java status bar

so..
plz help me to put a status bar

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Java Swing status bar

by cdumitru In reply to how to set status bar in ...

The Swing library doesn't have a specific component for statusbar. The hack is you create a ordinary component- say JPanel - and set its border to LOWERED - BevelBorder. Then add this component to the SOUTH of your BorderLayouted JFrame.

import javax.swing.*;
import javax.swing.border.*;

====================

JPanel jp_status = new JPanel();
jp_status.setLayout(new BorderLayout());
jp_status.add(new JLabel("Subhash"), BorderLayout.CENTER);

jp_status.setBorder(new BevelBorder(BevelBorder.LOWERED));

// ``ct'' is the Container of JFrame
ct.add(jp_status,BorderLayout.SOUTH);

You can also check http://www.jguru.com/faq/view.jsp?EID=476472

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums