|
||||||||||||||
|
|
|||||||||||||
|
|
|||
|
|||
|
|||
|
Using WebRenderer with Java Layout Managers | ||
|
|
|
|
|
|
WebRenderer has a default sizing of 200x200
pixels. A
common Java layout manager is the FlowLayout the default layout manager used
by a JPanel. When WebRenderer is added to a FlowLayout WebRenderer has a
default size of 200x200 pixels. The minium size can be changed by calling the
following: browser. setPreferredSize(100, 100); // Set the browser to 100x100 pixels In the WebRenderer examples included with the SDK download we use a BorderLayout. The BorderLayout sets the size of the component to whatever space the layout has left over (if added in the CENTER position) after adding other components as done with WebRenderer in the examples. |
|
|
|
|
|
|
|
|
Example using a BorderLayout: |
|
|
|
|
|
|
|
JPanel
panel = new JPanel(new BorderLayout()); |
|
|
Copyright � JadeLiquid Software - www.jadeliquid.com |