Label on an etched JPanel

Posted on 2004-03-22
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.
Question by:dwaneos
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
LVL 86

Expert Comment

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

Author Comment

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

Accepted Solution

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

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

Expert Comment

ID: 10649068

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet example 11 76
by zero exception 10 83
ejb wildfly example 2 111
spring maven example issues 3 102
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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 theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

734 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