Results 1 to 4 of 4
  1. #1
    saber210 is offline Member
    Join Date
    Jul 2011
    Posts
    15
    Rep Power
    0

    Default Load Image before the Application

    Is there any way to an image before the application starts?

    And time limit on the image before it loads the main program.

    Btw, im using Netbeans IDE 6.9.1

    Could you teach me how to do that?

    Thanks!

    EDIT: Another thing, how can i set background music on my program. Also background images on jpanel, and jframes..

    and how to resize the textarea and textfield? setbounds are not working..

    Thanks again!
    Last edited by saber210; 07-31-2011 at 09:43 AM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,317
    Rep Power
    25

    Default

    Is there any way to an image before the application starts?
    If there is no application code executing, what code would do a load?
    Are you asking about a "splash" image. See the SplashScreen class.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,196
    Rep Power
    19

    Default

    how can i set background music on my program.
    Refer to the API for Applet#newAudioClip(...) and the class of object that method returns.

    how to resize the textarea and textfield? setbounds are not working.
    Good they aren't. Learn to use layout managers.
    Lesson: Laying Out Components Within a Container (The Java™ Tutorials > Creating a GUI With JFC/Swing)

    db

  4. #4
    Marcoita_88 is offline Member
    Join Date
    Aug 2011
    Location
    Italy
    Posts
    9
    Rep Power
    0

    Default

    You want a splash screen, here is a tutorial from Oracle:
    How to Create a Splash Screen (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features)
    and here is the SplashScreen class javadoc:
    SplashScreen (Java Platform SE 6)
    For the music, maibe you can extend the SplashScreen class and insert the code for music as suggested from DarryBurke.

Similar Threads

  1. How to load an image using Toolkit
    By pappyj77 in forum AWT / Swing
    Replies: 7
    Last Post: 07-25-2011, 01:16 PM
  2. Load and Draw image
    By TheSheepeh in forum New To Java
    Replies: 2
    Last Post: 03-19-2011, 12:19 PM
  3. Load image to jPanel
    By DJIT in forum AWT / Swing
    Replies: 7
    Last Post: 12-27-2010, 12:48 PM
  4. Can not load image in SWT/Eclipse
    By janice in forum SWT / JFace
    Replies: 4
    Last Post: 10-03-2008, 04:53 PM
  5. Help with load image
    By trill in forum New To Java
    Replies: 1
    Last Post: 08-01-2007, 07:16 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
  •