• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 844
  • Last Modified:

writing text on JPanel

Now nothing can't be more basic. :(

But still not able to figure out how can I write text on JPanel.

Thanks !
0
hipal
Asked:
hipal
  • 2
3 Solutions
 
CEHJCommented:
Add a JLabel to it and call setText on it
0
 
rodnessCommented:
You need to put your text in a JLabel, and add that into the JPanel.
0
 
objectsCommented:
have a read here

http://download.oracle.com/javase/tutorial/uiswing/components/label.html

you can also achieve it by subclassing JPanel and overriding paintComponent(). That will give you more flexibility
0
 
CEHJCommented:
:-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now