'Java' Category

  • Jan
    25
    2010

    Eclipse 3.5.1 mouse event problems with gtk >= 2.18

    Recently, Eclipse started ignoring clicks on dialog buttons for me. This seems to be due to some changes in gtk 2.18. It does not use native windows for all widgets anymore, and SWT seems to rely on it.
    Thanks to this blog post, I have this fix in my bashrc:
    1alias eclipse="GDK_NATIVE_WINDOWS=true eclipse"
    The Debian bug tracker also [...]

  • Mar
    17
    2009

    Enforcing the aspect ratio of a Swing widget

    Sometimes, a widget only looks good at a given aspect ratio (movies, pictures, etc.).
    I wrote a small Swing container for this task today, which you can find at my trac installation. There is also a small example program.
    Usage boils down to using
    parent.add(new AspectRatioContainer(4.0/3.0, widget)).
    instead of just
    parent.add(widget);
    Perhaps this is of use to somebody.

 
Powered by Wordpress and MySQL. Theme by openark.org