congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Container.getHeight
Code IndexAdd Tabnine to your IDE (free)

How to use
getHeight
method
in
java.awt.Container

Best Java code snippets using java.awt.Container.getHeight (Showing top 20 results out of 1,224)

Refine searchRefine arrow

  • Container.getWidth
origin: runelite/runelite

int parentWidth = canvasParent.getWidth();
int parentHeight = canvasParent.getHeight();
origin: runelite/runelite

final double sw = (1.0 * parent.getWidth()) / pd.width;
final double sh = (1.0 * parent.getHeight()) / pd.height;
origin: runelite/runelite

int parentWidth = canvasParent.getWidth();
int parentHeight = canvasParent.getHeight();
origin: stackoverflow.com

 Container c = getContentPane();
BufferedImage im = new BufferedImage(c.getWidth(), c.getHeight(), BufferedImage.TYPE_INT_ARGB);
c.paint(im.getGraphics());
ImageIO.write(im, "PNG", new File("shot.png"));
origin: nodebox/nodebox

public void takeScreenshot(File outputFile) {
  Container c = getContentPane();
  BufferedImage img = new BufferedImage(c.getWidth(), c.getHeight(), BufferedImage.TYPE_INT_RGB);
  Graphics2D g2 = img.createGraphics();
  c.paint(g2);
  try {
    ImageIO.write(img, "png", outputFile);
  } catch (IOException e) {
    throw new RuntimeException(e);
  }
}
origin: ron190/jsql-injection

int layeredPaneWidth = layeredPane.getWidth();
int layeredPaneHeight = layeredPane.getHeight();
origin: it.tidalwave.netbeans/it-tidalwave-netbeans-swing

@Override @Nonnull
public Dimension preferredLayoutSize (final @Nonnull Container container) 
 {
  return new Dimension((int)(container.getWidth() * (1 - leftSpring - rightSpring)), 
             (int)(container.getHeight() * (1 - topSpring - bottomSpring)));
 }
origin: it.tidalwave.netbeans/it-tidalwave-netbeans-swing

 public void layoutContainer (final Container container) 
  {
   final int width = container.getWidth();
   final int height = container.getHeight();
   for (int i = 0; i < container.getComponentCount(); i++) 
    {
     final Component component = container.getComponent(i);
     component.setBounds(0, 0, width, height);
    }
  }    
}        
origin: org.geotools/gt-widgets-swing-pending

public void layoutContainer(Container parent) {
  int maxWidth = parent.getWidth();
  int maxHeight = parent.getHeight();
  int nComps = parent.getComponentCount();    
  
  for (int i = 0 ; i < nComps ; i++) {
    Component c = parent.getComponent(i);                
    c.setBounds(0, 0, maxWidth,maxHeight);
  }
}

origin: net.anwiba.commons/anwiba-commons-swing-core

@Override
public void layoutContainer(final Container target) {
 int counter = 0;
 final int width = target.getWidth();
 final int height = target.getHeight() / this.numberOfRows;
 for (final Component c : target.getComponents()) {
  c.setBounds(0, height * counter++, width, height);
  if (c instanceof JComponent) {
   ((JComponent) c).setBorder(BorderFactory.createLineBorder(this.borderColor, 1));
  }
 }
}
origin: org.netbeans.api/org-openide-explorer

  @Override
  public void layoutContainer( Container parent ) {
    super.layoutContainer(parent);
    if( null != searchPanel && searchPanel.isVisible() ) {
      Insets innerInsets = getInnerInsets();
      Dimension prefSize = searchPanel.getPreferredSize();
      searchPanel.setBounds(innerInsets.left, parent.getHeight()-innerInsets.bottom-prefSize.height,
          parent.getWidth()-innerInsets.left-innerInsets.right, prefSize.height);
    }
  }
}
origin: org.netbeans.api/org-openide-explorer

@Override
public void layoutContainer( Container parent ) {
  super.layoutContainer(parent);
  if( null != searchpanel && searchpanel.isVisible() ) {
    Insets innerInsets = getInnerInsets();
    Dimension prefSize = searchpanel.getPreferredSize();
    searchpanel.setBounds(innerInsets.left, parent.getHeight()-innerInsets.bottom-prefSize.height,
        parent.getWidth()-innerInsets.left-innerInsets.right, prefSize.height);
  }
}

origin: stackoverflow.com

 Container pane = frame.getContentPane();
BufferedImage img = new BufferedImage(pane.getWidth(), pane.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = img.createGraphics();
pane.printAll(g2d);
g2d.dispose();
try {
  ImageIO.write(img, "png", new File("save.png"));
} catch (IOException ex) {
  ex.printStackTrace();
}
origin: google/sagetv

 public void layoutContainer(java.awt.Container parent)
 {
  c.setBounds(parent.getInsets().left, parent.getInsets().top, parent.getWidth() - parent.getInsets().left - parent.getInsets().right,
    parent.getHeight() - parent.getInsets().top - parent.getInsets().bottom);
  //System.out.println("LAYOUT frame bounds=" + f.getBounds() + " videoBounds=" + videoBounds + " parentBounds=" + parent.getBounds());
 }
};
origin: com.github.insubstantial/flamingo

@Override
public Dimension preferredLayoutSize(Container c) {
  if (scrollablePanel.getScrollType() == ScrollType.HORIZONTALLY) {
    return new Dimension(c.getWidth(), 21);
  } else {
    return new Dimension(21, c.getHeight());
  }
}
origin: google/sagetv

 public void layoutContainer(java.awt.Container parent)
 {
  c.setBounds(parent.getInsets().left, parent.getInsets().top, parent.getWidth() - parent.getInsets().left - parent.getInsets().right,
    parent.getHeight() - parent.getInsets().top - parent.getInsets().bottom);
  //							videoCanvas.setBounds(parent.getInsets().left, parent.getInsets().top,
  //								parent.getWidth() - parent.getInsets().left - parent.getInsets().right,
  //								parent.getHeight() - parent.getInsets().top - parent.getInsets().bottom);//vf.setBounds(x, y, w, h);
  //System.out.println("LAYOUT frame bounds=" + f.getBounds() + " videoBounds=" + videoBounds + " parentBounds=" + parent.getBounds());
 }
};
origin: google/sagetv

 public void layoutContainer(java.awt.Container parent)
 {
  c.setBounds(parent.getInsets().left, parent.getInsets().top, parent.getWidth() - parent.getInsets().left - parent.getInsets().right,
    parent.getHeight() - parent.getInsets().top - parent.getInsets().bottom);
  //System.out.println("LAYOUT frame bounds=" + f.getBounds() + " videoBounds=" + videoBounds + " parentBounds=" + parent.getBounds());
 }
};
origin: com.github.insubstantial/substance

@Override
public void layoutContainer(Container parent) {
  Dimension fpp = fixedPanel.getPreferredSize();
  int dx = (parent.getWidth() - fpp.width) / 2;
  int dy = (parent.getHeight() - fpp.height) / 2;
  fixedPanel.setBounds(dx, dy, fpp.width, fpp.height);
}
origin: com.github.insubstantial/flamingo

  @Override
  public void layoutContainer(Container c) {
    int width = c.getWidth();
    int height = c.getHeight();
    scrollerPanel.setBounds(0, 0, width, height);
  }
}
origin: com.github.insubstantial/flamingo

@Override
public void layoutContainer(Container parent) {
  Insets insets = parent.getInsets();
  int left = insets.left;
  int right = insets.right;
  int top = insets.top;
  int bottom = insets.bottom;
  scroll.setBounds(left, top, parent.getWidth() - left - right,
      parent.getHeight() - top - bottom);
}
java.awtContainergetHeight

Popular methods of Container

  • add
    Adds the specified component to this container. This is a convenience method for #addImpl. This meth
  • setLayout
    Sets the layout manager for this container.
  • getComponents
    Gets all the components in this container.
  • getComponent
    Gets the nth component in this container.
  • getParent
  • getComponentCount
    Gets the number of components in this panel.
  • remove
    Removes the specified component from this container.
  • getWidth
  • getInsets
    Determines the insets of this container, which indicate the size of the container's border. A Frame
  • getSize
  • repaint
  • setBackground
  • repaint,
  • setBackground,
  • getLayout,
  • validate,
  • getTreeLock,
  • removeAll,
  • getPreferredSize,
  • getBackground,
  • getBounds

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Permission (java.security)
    Legacy security code; do not use.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Option (scala)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now