Results 1 to 2 of 2
  1. #1
    shashank.pr is offline Member
    Join Date
    Nov 2013
    Posts
    1
    Rep Power
    0

    Post Dynamic Jlabel display

    Hi all,
    I'm new to swings, I'm stuck in displaying a label dynamically. Let me explain what my application do.

    Its more like a form which is filled with some text fields, image selector and drop Downs lists. User fills in all the details and clicks on submit button then a message i.e a label has to be displayed at the top of the form, "Your request is being processed. Please wait......" .
    Then a backend execution comes in and after execution I need to clear it out.

    Problem here is I am able to see the label only after the control comes back from backend process instead of displaying it immediately on click of submit button.

    I tried repainting and validating the parent frame as well as the panel nothing worked out.

    Please help me out.

    Thanks in advance and appreciate your help on this.

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,365
    Rep Power
    6

    Default Re: Dynamic Jlabel display

    You are probably blocking the Swing Event Dispatch Thread by running your backend process on it, for example by putting the code inside a button action handler. Whatever backend process you are executing should be done on a separate thread you create yourself.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Display information in dynamic textboxes
    By maas in forum New To Java
    Replies: 0
    Last Post: 06-02-2013, 10:38 PM
  2. How can i display a number on a jlabel.
    By Shin in forum New To Java
    Replies: 4
    Last Post: 10-15-2012, 06:13 PM
  3. [Urgent Help] JLabel images display
    By baobao816 in forum AWT / Swing
    Replies: 2
    Last Post: 05-12-2012, 10:46 AM
  4. Adding a JLabel to a JPanel - jlabel not showing
    By Bongeh in forum New To Java
    Replies: 17
    Last Post: 04-07-2010, 12:02 AM
  5. Dynamic display of images
    By gixerino in forum NetBeans
    Replies: 7
    Last Post: 01-15-2009, 03:55 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
  •