Changeset 7784 for trunk/projects


Ignore:
Timestamp:
10/13/11 15:53:53 (8 years ago)
Author:
curtis
Message:

Start window as tall as reasonably possible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/visbio-plugins/src/main/java/loci/visbio/OrthoStack.java

    r7783 r7784  
    4343 
    4444import java.awt.BorderLayout; 
     45import java.awt.Dimension; 
    4546import java.awt.Graphics; 
    4647import java.awt.Image; 
    4748import java.awt.MediaTracker; 
     49import java.awt.Toolkit; 
    4850import java.awt.event.AdjustmentEvent; 
    4951import java.awt.event.AdjustmentListener; 
     
    225227                } 
    226228 
     229                // add ortho stack to a window frame 
    227230                final JFrame frame = new JFrame(getImagePlus().getTitle()); 
    228231                frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 
    229232                frame.addWindowListener(this); 
    230233                frame.setContentPane(this); 
     234 
     235                // size frame and display onscreen 
    231236                frame.pack(); 
     237                final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); 
     238                frame.setSize(frame.getWidth(), 9 * screenSize.height / 10); 
    232239                frame.setVisible(true); 
    233240        } 
Note: See TracChangeset for help on using the changeset viewer.