Class PanelResizeToPreferredSize
From the email thread: "The panel doesn't get a preferred size until layout is called (which, in turn, happens the first time it's painted). This means you're not going to get the results you want if your XHTMLPanel is managed by a layout manager that relies on preferred size (e.g. FlowLayout). Assuming you want to lay the document out into some width, you'll want to use a layout manager that doesn't rely (entirely) on preferred size.
If you need the entirely unconstrained document width, you could temporarily boost the size of the XHTMLPanel to something very large and then call panel.doLayout() and then read back the panel's preferred size. Needless to say, this all needs to happen on the EDT." and: "So basically you want to: 1) create the frame and add components to it 2) call f.pack() to make them displayable 3) layout documents in XHTMLPanel instances 4) call f.pack() again now that the preferred size of the XHTMLPanel instances has been calculated"
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PanelResizeToPreferredSize
public PanelResizeToPreferredSize()
-
-
Method Details
-
main
- Throws:
Exception
-