Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By Tolls

Thread: JavaFX : How to set icon for stage

  1. #1
    Join Date
    Jul 2014
    Rep Power

    Question JavaFX : How to set icon for stage

    As we can set title for stage using stage.setTitle("hello world") . but how can we set icon for stage that get displayed just before the Title of stage.

    - Kapil

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: JavaFX : How to set icon for stage

    Java FX Code:
    <stage>.getIcons().add(<your image>);
    Not the most obvious way of doing it, IMO, but it is an ObservableList so, presumably, triggers screen updates.

    You should also (as per the docs) provide a range of sizes as FX will try and pick the most suitable one to use, as this list is also used for the minimised icons. likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    Join Date
    Jul 2014
    Rep Power

Similar Threads

  1. JavaFX Book | Learn JavaFX More In Depth
    By SnakeDoc in forum JavaFX
    Replies: 0
    Last Post: 05-18-2013, 12:10 AM
  2. preverifying stage error
    By apoorva in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 03-26-2011, 04:23 PM
  3. JavaFX Script and JavaFX Mobile
    By levent in forum Java Software
    Replies: 1
    Last Post: 01-27-2010, 05:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts