Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 476661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:30:43+00:00 2026-05-13T00:30:43+00:00

I have a JFrame object, and i need to support two JVM 1.5 on

  • 0

I have a JFrame object, and i need to support two JVM 1.5 on Mac OS X and 1.6 on Windows. On windows I need to use setIconImages function to set multiple icon sized for the application but this function is not availible on 1.5. Is it possible to call this function inside JFrame with reflection?

Application extends JFrame{
.
.
.
  void init(){
   //check version
   //call setIconImages 
  }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:30:44+00:00Added an answer on May 13, 2026 at 12:30 am

    I would do something like the following (wont’ compile, but should get you started):

    create a class called FrameUtils and give it the following method:

    public static void setIconImages(final java.awt.Window window, 
                                     final List<? extends Image> icons) 
    {
        try
        {
            Method setIconImagesMethod;
    
            setIconImagesMethod = // use reflection to get the setIconImages method. 
            setIconImagesMethod.invoke(window, icons);
        }
        catch(final NoSuchMethodException ex)
        {
            // fall back to the single image method
            window.setIconImage(icons.get(0));
        }
    }
    

    This link shows you how to get the method and call it via reflection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Till now, I have developed simple swing applications so there was no need to
basically I want my JFrame to become a completely new JFrame object when an
I have 3 classes that I have written some part of them below.when i
I have a tree and a table on my panel, when I click the
I have a ajax image upload script which i found here http://www.fengcool.com/2009/06/ajax-form-upload-local-image-file-without-refresh/ The problem
I have a Swing application that I would like to convert from spaghetti to
How can I specify the location on JFrame that a component (JLabel specifically) is
I'm creating a Java applet from a large scale pre-existing project (Vizster). I am
In the effort to learn more about applets and Java, I am experimenting making

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.