Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Label on an etched JPanel

Posted on 2004-03-22
4
Medium Priority
?
292 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 150 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
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.
Suggested Courses

664 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