NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #626 (closed defect: fixed)

Opened 2011-06-21T10:57:24-05:00

Last modified 2011-09-25T22:29:47-05:00

Newly opened images have wrong window size

Reported by: bdezonia Owned by: gharris
Priority: major Milestone: imagej2-b1-initial
Component: UI Framework Version:
Severity: serious Keywords:
Cc: Blocked By:


Using 7feeec6da90f475fea86cb0e43bfca37dcdfb828: opening new Images results in the image area being a little too small and scrollbars being created.

Change History

comment:1 Changed 2011-06-21T14:01:52-05:00 by bdezonia

  • Owner changed from bdezonia to curtis
  • Status changed from new to assigned

Note that it used to be that the image was a little too big (see ticket #590). Maybe Curtis adjusted this recently. Reassigning to him for clarification.

comment:2 Changed 2011-08-02T10:54:04-05:00 by curtis

  • Milestone changed from imagej-2.0-beta2 to imagej-2.0-alpha5

comment:3 Changed 2011-08-02T11:26:00-05:00 by bdezonia

There are a couple display size oriented bugs scheduled for alpha5. They may not be related but take a look at #605 and #627.

comment:4 Changed 2011-09-09T11:21:14-05:00 by curtis

  • Owner changed from curtis to gharris

comment:5 Changed 2011-09-19T14:53:09-05:00 by gharris

  • Status changed from assigned to closed
  • Resolution set to fixed

Turns out, we needed to add an override for Dimension getPreferredSize() in JHotDrawImageCanvas and add 4 to the w and h. (Don't ask me why it is 4.)

This was after many tests to figure out where the sizing was occurring. The UI component is many-layered (including JScrollPane, JPanel, Drawing, ...)

To do next: Account for the bounds of the desktop/workspace and the positioning of the
window therein... See new ticket #763.

comment:6 Changed 2011-09-25T22:29:47-05:00 by curtis

FYI, the value needed to be 5 to fix the problem on Mac OS X.