Zooming Swing

There is a nice zoom function included in Firefox: You can use CTRL+ and CTRL- to zoom in and out of a website. Why isn’t such a function available for Swing applications? It shouldn’t be too complicated to create it!  So I started to create a new Scalable Layout Manager.

Here is a short preview of it: Flash Demo Video 

It already works with the following layouts:

  • Null (Absolute) Layout
  • Border Layout
  • Card Layout
  • Flow Layout
  • Gridbag Layout
  • JGoodies Layout

Still under work:

  • Box Layout
  • Grid Layout
  • Spring layout

Integration into existing applications is simple:

// Install scalable layout and CTRL+/CTRL- keys for scaling operations
ScalableLayoutUtils.installScalableLayoutAndKeys(new DefaultScalableLayoutRegistry(), frame, 0.1);

The source is available as part of the Utils4Swing5 library.

2 thoughts on “Zooming Swing

  1. cool.. have just been looking for this exact feature – JGoodies Layout vote from me !!!

  2. Hi aloleary,

    I found it also works with all JGoodies layouts I tried from the JGoodies examples.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s