Solved

Label on an etched JPanel

Posted on 2004-03-22
4
290 Views
Last Modified: 2012-05-04
Anyone know how to put a label on an etched JPabel or something similar to a frame in VB? I think.
0
Comment
Question by:dwaneos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10648788
panel.add(new JLabel("i'm a label!"));
0
 

Author Comment

by:dwaneos
ID: 10648857
Nope, want it embedded into the jpanel on just on top of it.
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
ID: 10648883
Override paintComponent in JPanel subclass


public void paintComponent(Graphics g) {
      super.paintComponent(g);
      g.drawString("I'm a label!", 10, 10);
}
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10649068
8-)
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question