Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: Is a splashscreen an option or even a good idea?

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Location
    Denmark
    Posts
    27
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Is a splashscreen an option or even a good idea?

    Hey.
    I am developing a note application, which is based on MySQL, Java, Hibernate and SWING and some other components.
    Do to amount of libraries and data the application load, the users start up time (from the press icon to seeing the app) is to long about 30 seconds - 1 minut.
    I would like to show the user a processbar or something similar to that, to give the user and impression that the application is actually doing something.

    So is a splashscreen as an component a good idea or should I choose something else? if yes any idea to which component?

    - PS. The reason for the long data load time is because the users load 30000+ notes which include videos and other media files.


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Is a splashscreen an option or even a good idea?

    If I see a splash screen for more than two seconds, I would think it has frozen.
    Show a progress bar (in addition to) your "logo" or what ever on the splash, if necessary.
    Never make a user wait 30 seconds for anything to load, ever. Load part and show it. Load something fast and get it in their face, let the rest load in the background.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,482
    My Mood
    Mellow
    Thanks
    151
    Thanked 609 Times in 596 Posts

    Default Re: Is a splashscreen an option or even a good idea?

    It may be a personal preference thing, but I think a splash screen with some indication of what's going on - especially for up to a minute load time - is an excellent idea. I use Eclipse on some older hardware, and the load time is pretty long, but the splash screen and progress indicators which are given in both words and a progress bar are 'comforting.' Comforting, because I know that good things are happening and the danged machine hasn't frozen up.

  4. #4
    Junior Member
    Join Date
    Sep 2013
    Location
    Denmark
    Posts
    27
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Is a splashscreen an option or even a good idea?

    Okay Splashscreen it is

    @jps - could an idea be to make struct like objec of a note containing name and db id perhaps ?

  5. #5
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Is a splashscreen an option or even a good idea?

    I do not understand what you mean in that question, can you explain?

  6. #6
    Junior Member
    Join Date
    Sep 2013
    Location
    Denmark
    Posts
    27
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Is a splashscreen an option or even a good idea?

    Well my users like all their notes a soon as the application start, but they are represent in a JTree by name. Could a solution instead be like this:
    Under startup: Load note name (not unique) and note id, into a Note object and then load the rest on demand ?

  7. #7
    Super Moderator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,235
    Thanks
    176
    Thanked 817 Times in 760 Posts
    Blog Entries
    5

    Default Re: Is a splashscreen an option or even a good idea?

    From what I understand, it sounds like the loading time is due to loading ALL data at once. A faster way would be to load data lazily - if in a JTree load only the parent nodes and load on demand as one expands a node. When a leaf is selected then only then load the necessary data. My .02, and I could be misunderstanding how the application works, but 30 seconds to load is way too long IMO

  8. #8
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,608
    Thanks
    24
    Thanked 316 Times in 295 Posts

    Default Re: Is a splashscreen an option or even a good idea?

    Your JTree is really just a bunch of file names (or note names), correct? If so, a good middle ground (between what you want and copeg's lazy load idea), imo, would be to load the note NAMES immediately to simply establish the tree. That shouldn't take long at all, even for 30,000+ items. Then you can lazily load the notes themselves in the background as the user is busy navigating the tree. You could even load them lazily based on where the user is in the tree. If the user selects a note in the tree which has not been lazily loaded yet, throw that to the top of your load list so the user doesn't have to wait long (if at all) for it to be loaded.
    It does add the additional complexity of temporarily separating the note names from the notes themselves, but that is not something that would be difficult to deal with. Something as simple as a map would do (where the key is the note's name and the value is the note). If you do a get on the map with a note name and it comes back as null, you haven't loaded that note yet (remember to synchronize your threads when accessing the map).
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  9. #9
    Junior Member
    Join Date
    Sep 2013
    Location
    Denmark
    Posts
    27
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Is a splashscreen an option or even a good idea?

    @copeg and aussiemcgr thank you I will use that
    Ruby 'cause I can - Java 'cause I want - C# 'cause I have to

Similar Threads

  1. Today is a very good day and I'm in a good mood
    By AHefphern in forum The Cafe
    Replies: 0
    Last Post: May 15th, 2013, 03:10 AM
  2. Replies: 10
    Last Post: April 21st, 2013, 09:28 AM
  3. Need a good rpg game idea..
    By Emperor_Xyn in forum Java Theory & Questions
    Replies: 5
    Last Post: January 3rd, 2012, 09:44 PM
  4. [Y/N] Option
    By OOO in forum What's Wrong With My Code?
    Replies: 4
    Last Post: March 25th, 2011, 10:19 PM
  5. [SOLVED] 2D Collections. How to make them and is it a good idea to do so?
    By javapenguin in forum What's Wrong With My Code?
    Replies: 3
    Last Post: January 15th, 2011, 12:38 AM