List of usage examples for javax.swing JTabbedPane getSize
public Dimension getSize()
From source file:edu.ku.brc.specify.tasks.subpane.lm.LifeMapperPane.java
/** * @return/* ww w . ja v a2 s . co m*/ */ private int getCurrentSizeSquare() { int maxHeight = MAP_HEIGHT; int maxWidth = MAP_WIDTH; if (SubPaneMgr.getInstance() instanceof JTabbedPane) { Dimension size; JTabbedPane tbPane = (JTabbedPane) SubPaneMgr.getInstance(); if (tbPane.getTabCount() > 0) { size = tbPane.getComponentAt(0).getSize(); } else { size = tbPane.getSize(); size.height -= 30; } int lblHeight = (UIHelper.createLabel(" ").getPreferredSize().height) * 5; maxHeight = size.height - lblHeight - IMG_HEIGHT - 30; maxWidth = size.width - 20; } return Math.min(maxHeight, maxWidth); }