Results 1 to 4 of 4
  1. #1
    Pojahn_M's Avatar
    Pojahn_M is offline Senior Member
    Join Date
    Mar 2011
    Location
    Sweden
    Posts
    197
    Rep Power
    4

    Default My GUI newbie thread

    This is the thread where I will dump all my GUI related question(instead of creating tons of topics).

    First question, Java Swing spinning loading component - YouTube
    Cant someone give me a hind which class and method I can create this?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: My GUI newbie thread

    Quote Originally Posted by Pojahn_M View Post
    This is the thread where I will dump all my GUI related question(instead of creating tons of topics).
    Most of us prefer that you create a separate thread for a new question. Your questions are not for your benefit alone but also for the benefit of future viewers of this site, and it would be best for all to allow for easy topic searches. On that note, you'd be best served to use specific thread headings.

    First question, Java Swing spinning loading component - YouTube
    Cant someone give me a hind which class and method I can create this?
    You can create something like that with a JLabel that has a custom paintComponent override and uses a Swing Timer.

  3. #3
    Pojahn_M's Avatar
    Pojahn_M is offline Senior Member
    Join Date
    Mar 2011
    Location
    Sweden
    Posts
    197
    Rep Power
    4

    Default Re: My GUI newbie thread

    okey, one thread per question.

    btw, I think I will ditch the idea about that spinning loading thing(its to confusing, I get back into it later).
    Instead, I am trying to create a JDialog that is semi-modal.
    Example, I when my program is encrypting a file, there should be a modal JDialog(without any buttons) that should say "Please wait, program working...". But in the same time, the encryption process should continue(a modal JDialog would freeze that operation if I am correct).
    So, tips on how to create a semi-modal dialog?

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: My GUI newbie thread

    Quote Originally Posted by Pojahn_M View Post
    btw, I think I will ditch the idea about that spinning loading thing(its to confusing, I get back into it later).
    Instead, I am trying to create a JDialog that is semi-modal.
    Example, I when my program is encrypting a file, there should be a modal JDialog(without any buttons) that should say "Please wait, program working...". But in the same time, the encryption process should continue(a modal JDialog would freeze that operation if I am correct).
    So, tips on how to create a semi-modal dialog?
    Use a modal dialog. The encryption process will need to be done in a background thread, one that is started just before displaying your dialog (or progress monitor of some sort). If you use a SwingWorker for encryption, there are several ways to easily monitor it so that you'll know when its done such as by using a PropertyChangeListener and listen to the SwingWorker's state property to see if it is SwingWorker.StateValue.DONE. The API will show you how to do this.

Similar Threads

  1. Pojahns newbie thread
    By Pojahn_M in forum New To Java
    Replies: 80
    Last Post: 04-22-2011, 11:37 PM
  2. Replies: 6
    Last Post: 03-19-2011, 07:10 PM
  3. Replies: 4
    Last Post: 06-07-2009, 12:59 AM
  4. Replies: 3
    Last Post: 06-07-2009, 12:14 AM
  5. Replies: 12
    Last Post: 05-26-2009, 01:48 PM

Posting Permissions

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