Java applets help


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Java applets help

  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, 06:58 AM
  2. Replies: 0
    Last Post: 04-17-2006, 08:04 AM
  3. Java vs. .Net. A questionnaire
    By Basil in forum .NET
    Replies: 1
    Last Post: 05-13-2005, 07:46 AM
  4. Replies: 0
    Last Post: 08-18-2000, 11:35 AM

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center