DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Posts
    14

    Java applets help

    I am trying to get a .png file to display as the background for my applet.
    What would be the best way to do this.

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    If you are using swing (JApplet) you override the paintComponent(Graphics g) method and draw the image there. If you set the applet's layoutmanager to null, you can then add components on top of the image if you first invoke the components' setBounds -method for positioning them.
    eschew obfuscation

Similar Threads

  1. Java book
    By Lou in forum Java
    Replies: 9
    Last Post: 09-19-2007, 05:58 AM
  2. Replies: 0
    Last Post: 04-17-2006, 07:04 AM
  3. Java vs. .Net. A questionnaire
    By Basil in forum .NET
    Replies: 1
    Last Post: 05-13-2005, 06:46 AM
  4. Replies: 0
    Last Post: 08-18-2000, 10:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links