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

Thread: Update JLabel in JTextPane

  1. #1
    sakray is offline Member
    Join Date
    Oct 2013
    Posts
    5
    Rep Power
    0

    Default Update JLabel in JTextPane

    Hi, I'v added some JLabels to a JTextPane as components. At run time i want to change the background color on some of them, but they do not change. Any ideas? Thanks

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,669
    Rep Power
    5

    Default Re: Update JLabel in JTextPane

    Without code? No.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    911
    Rep Power
    2

    Default Re: Update JLabel in JTextPane

    Make sure you call setOpaque(true) on each label.
    gimbal2 likes this.

Similar Threads

  1. jLabel update
    By Ericyue in forum New To Java
    Replies: 1
    Last Post: 04-13-2012, 04:14 AM
  2. Problem about JLabel not update in JPanel
    By fantasyme in forum Java Applets
    Replies: 11
    Last Post: 10-16-2011, 07:00 AM
  3. update a jlabel
    By niba10 in forum AWT / Swing
    Replies: 3
    Last Post: 04-04-2011, 07:43 PM
  4. Update JLabel during loop automatically
    By carnado2008 in forum AWT / Swing
    Replies: 4
    Last Post: 01-22-2011, 02:55 PM
  5. Jlabel update problem
    By fantasyme in forum AWT / Swing
    Replies: 3
    Last Post: 04-14-2010, 05:10 AM

Posting Permissions

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