Label on an etched JPanel

Anyone know how to put a label on an etched JPabel or something similar to a frame in VB? I think.
dwaneosAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
CEHJConnect With a Mentor Commented:
Override paintComponent in JPanel subclass


public void paintComponent(Graphics g) {
      super.paintComponent(g);
      g.drawString("I'm a label!", 10, 10);
}
0
 
CEHJCommented:
panel.add(new JLabel("i'm a label!"));
0
 
dwaneosAuthor Commented:
Nope, want it embedded into the jpanel on just on top of it.
0
 
CEHJCommented:
8-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.