Results 1 to 2 of 2
  1. #1
    Medabi3 is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default Need some help with JLabels.

    So I got this these codes:

    Java Code:
    		add(item1);
    		remove(item1);
    		add(item2);
    Is it any how possible to slow the part between add and remove item?
    Like I want the text to be visible for let's say 5 seconds, and then remove it so item2 is visible?
    I tried use Thread.Wait but it slowed the entire program down by 5 seconds. :(

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Moderator
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    9,917
    Rep Power
    16

    Default

    Use a Swing Timer.

    To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.

    db

Similar Threads

  1. Overlapping JLabels
    By littledrummerboy in forum New To Java
    Replies: 4
    Last Post: 05-24-2011, 04:47 PM
  2. Need help with JPanels and JLabels
    By littledrummerboy in forum New To Java
    Replies: 2
    Last Post: 05-13-2011, 10:43 PM
  3. Multiline JLabels
    By davetheant in forum New To Java
    Replies: 3
    Last Post: 01-21-2011, 01:18 PM
  4. can i have a JList of Jlabels?
    By chayan in forum AWT / Swing
    Replies: 3
    Last Post: 07-04-2010, 12:19 AM
  5. Overlapping JLabels
    By techbossmb in forum AWT / Swing
    Replies: 3
    Last Post: 09-21-2009, 03:21 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
  •