Page 2 of 2 FirstFirst 12
Results 21 to 24 of 24
  1. #21
    Join Date
    Mar 2012
    Posts
    23
    Rep Power
    0

    Default Re: Colouring in JTable cells?

    ahh thanks, never knew about the revalidate(). I've ended up using a removeAll(), revalidate() and repaint() on each panel and that seems to have done the trick! Think I've got all I need now! Thanks for your help.

  2. #22
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Colouring in JTable cells?

    That's rather inefficient considering that you could just as easily loop over the existing labels and setBackground(). That would not require a revalidate()/repaint() either.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #23
    Join Date
    Mar 2012
    Posts
    23
    Rep Power
    0

    Default Re: Colouring in JTable cells?

    I'd once again be stuck if I tried to do that :P So as long as it's working, I'll be okay! It's only an extra 6 lines of code !

  4. #24
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Colouring in JTable cells?

    burgergetsbored

    With regard to your PM and misuse of the abuse report feature: anything posted on a public forum is already in the public domain. If you had reservations about plagiarism, you shouldn't have sought help on a forum. The posts you deleted were relevant to the discussion in this thread and have been restored. Any further unjustified deletion of content may lead to a ban.

    I'm closing this thread.

    db

    THREAD CLOSED
    Last edited by DarrylBurke; 05-04-2012 at 11:52 PM.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Jtable cells not populating correctly
    By wlc in forum AWT / Swing
    Replies: 2
    Last Post: 04-04-2011, 05:57 AM
  2. Add datas to cells of JTable ???
    By bilgohan in forum AWT / Swing
    Replies: 5
    Last Post: 02-22-2010, 09:56 AM
  3. Coloring JTable cells
    By ProgrammingPup in forum Advanced Java
    Replies: 2
    Last Post: 11-04-2009, 10:57 PM
  4. How to merge cells of JTable
    By nehaa in forum AWT / Swing
    Replies: 1
    Last Post: 05-19-2009, 01:07 PM
  5. Getting objects from JTable Cells.
    By girigl in forum AWT / Swing
    Replies: 3
    Last Post: 12-24-2008, 10:46 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
  •