CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Swing Widgets

  1. #1

    Swing Widgets

    Hey guys. I have another question. Does anyone know if the swing control widgets are buggy? The reason I ask is because sometimes the controls or widgets will render fine but other times maybe only have of the text will render. I have tried invalidating the rontrol but that doesn't help.

    The only thing that makes the control render correctly is if I take the window and drag it off the screen and the back on the screen. Check out the following snap shots to see what I mean.

    [image]
    http://www.brandonfogerty.com/my_stuff/images/gui.JPG
    [/image]

    Any ideas? Thanks in advance!
    -- Brandon Fogerty
    Http://www.brandonfogerty.com

    "Not believing doesn't make something not true"
    May GOD Bless, Strengthen, Guide, Protect, and Reveal Wisdom to you Always!

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Swing Widgets

    Are you sure you are always using the EventDispatchThread to call your Swing components method's.

  3. #3
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Swing Widgets

    Swing components can sometimes be awkward and unintuitive to use, but they're not buggy in the sense you suggest.

    Without seeing the code, it's hard to say, but you may need to call repaint() on the component or its parent when you update the data.

    If I had eight hours to chop down a tree, I would spend 6 hours sharpening an axe...
    Anon.
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  4. #4
    Join Date
    Sep 2006
    Location
    Eastern, NC, USA
    Posts
    907

    Re: Swing Widgets

    If calling repaint doesn't work, then why don't you create an Short, Self Contained, Correct (Compilable), Example or SSCCE that demonstrates your bug, and let us take a look at it.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured