[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Programming

Posted on 1998-07-16
3
Medium Priority
?
223 Views
Last Modified: 2010-03-30
Can I use an image as background in application program ? Can I put TextFields and Buttons on the image?  
If can, how to code this? Could you please give me an example?
0
Comment
Question by:AmyS
[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 Comments
 

Author Comment

by:AmyS
ID: 1226870
Edited text of question
0
 

Expert Comment

by:mintt
ID: 1226871
sure you could,
check out on Panel Class
create your application base on Panel Class.
You can place what ever you like on panel.
draw background image in panel class.
0
 
LVL 16

Accepted Solution

by:
imladris earned 80 total points
ID: 1226872
Specifically, you should derive a panel of your own from the
Panel class. Then override the paint method to supply whatever
graphics you like. If you want to use show an Image it would be
something along the lines of:

class ImagePanel extends Panel
{   Image background;

    ImagePanel(Image bkg)
    {   background=bkg;
        return;
    }

    public void paint(Graphics g)
    {   g.drawImage(background,0,0,this);
        return;
    }
}

0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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 video teaches viewers about errors in exception handling.
Suggested Courses

650 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