Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing a tool using java Swing. I have used JFrame in it. Now I need to add a status bar into it so that I can easily identify line no in my jTextpane during typing in JtextPane. I am planing How can I do it? Can any one help me? If possible add some code snippet for reference.

Thanks.....
Posted

1 solution

If I recall correctly (and I may not -- my java is rusty), there is no status bar control in Java. If all you need to do is show some simple text, you can use a JLabel, anchoring it to the bottom of your JFrame. You may need to set it's border style to make it stand out from the rest of the window.
If you need something more complex, you can use a JPanel in place of the JLabel, choose the appropriate layout manager, and put your JLabels and whatever else you need in the JPanel.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900