Java Code Examples for java.awt.Dimension.getSize()

The following are Jave code examples for showing how to use getSize() of the java.awt.Dimension class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: OpenJSharp   File: BasicToolBarSeparatorUI.java   View Source Code Vote up 5 votes
public Dimension getPreferredSize( JComponent c )
{
    Dimension size = ( (JToolBar.Separator)c ).getSeparatorSize();

    if ( size != null )
    {
        return size.getSize();
    }
    else
    {
        return null;
    }
}
 
Example 2
Project: jdk8u-jdk   File: BasicToolBarSeparatorUI.java   View Source Code Vote up 5 votes
public Dimension getPreferredSize( JComponent c )
{
    Dimension size = ( (JToolBar.Separator)c ).getSeparatorSize();

    if ( size != null )
    {
        return size.getSize();
    }
    else
    {
        return null;
    }
}
 
Example 3
Project: openjdk-jdk10   File: BasicToolBarSeparatorUI.java   View Source Code Vote up 5 votes
public Dimension getPreferredSize( JComponent c )
{
    Dimension size = ( (JToolBar.Separator)c ).getSeparatorSize();

    if ( size != null )
    {
        return size.getSize();
    }
    else
    {
        return null;
    }
}