Status bar

E

Eitan M

Hello.

How can I add on a JFrame a status bar line
(line appear on the bottom left<->right of the frame).

Thanks :)
 
R

Roedy Green

How can I add on a JFrame a status bar line
(line appear on the bottom left<->right of the frame).
You can change the title of the frame, but that is about it. If you
wanted to use that space for additional gismos, you would have to
subclass JFrame.
 
A

Andrew Thompson

Roedy said:
You can change the title of the frame, but that is about it. If you
wanted to use that space for additional gismos, you would have to
subclass JFrame.

Rot.

JFrame frame = new JFrame("The Frame);
frame.getContentPane().setLayout( new BorderLayout() );
JLabel statusMessage = new JLabel();
frame.getContentPane().add( statusMessage, BorderLayout.SOUTH )
...

This is simply a statusMessage JLabel added to an
existing JFrame - no extend necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top