Solved

Layer ....

Posted on 2004-09-25
7
191 Views
Last Modified: 2010-03-31
Hi experts,

    Is java able to do "layers" in order to combine foreground & backfround work ? i.e. a foreground object moves in front of a background image ..... or it does not have such ability .....

    thanks !
0
Comment
Question by:meow00
  • 3
  • 2
  • 2
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 12150001
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 75 total points
ID: 12150004
0
 
LVL 14

Assisted Solution

by:sudhakar_koundinya
sudhakar_koundinya earned 75 total points
ID: 12150109
public void paint(Graphics g) {
        Graphics2D g2d = (Graphics2D)g;
   
        // Draw background...
   
        // Set alpha.  0.0f is 100% transparent and 1.0f is 100% opaque.
        float alpha = .3f;
        g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha));
   
        // Draw foreground...
    }
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 92

Accepted Solution

by:
objects earned 150 total points
ID: 12153186
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12154009
8-)
0
 
LVL 92

Expert Comment

by:objects
ID: 12156552
thanks (:
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 12156735
:)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse apache tomcat admin console 52 123
Tomcat: Unable to run tomcat service. 2 24
running on tomcat not jboss eap 7.0 3 18
restrict decimal places for double datatype 10 22
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

828 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