JGoodies JLabel with multiple lines  
Author Message
Tomek





PostPosted: 2006-8-8 17:30:00 Top

java-programmer, JGoodies JLabel with multiple lines Hi

I use JGoodies Forms to create a GUI application. I need to show a simple
multiline description in the window. I use JLabel with html text like
"<HTML> ... my description ... </HTML>".

Because it's multiline, java never knows how much lines it contains and what
is initial height of that component. When I add this do panel and show on
the screen, my frame has to small height and hides some components. General
problem is that I use different fonts (almst blind user can select bigger
fonts).

code:
-------------------------------
FormLayout layout = new FormLayout("fill:500px", // kolumny
"p, 10px, p, 10px, p, 7px, p, 7px, p, 10px, p"); //
wiersze

PanelBuilder builder = new PanelBuilder(layout);
builder.setDefaultDialogBorder();
CellConstraints cc = new CellConstraints();

...........
builder.add(textArea, cc.xy(1,3));
...........
getContentPane().add(builder.getPanel());
pack();


Can anyone help me ?

Tom


 
IchBin





PostPosted: 2006-8-9 3:24:00 Top

java-programmer >> JGoodies JLabel with multiple lines Tomek wrote:
> Hi
>
> I use JGoodies Forms to create a GUI application. I need to show a simple
> multiline description in the window. I use JLabel with html text like
> "<HTML> ... my description ... </HTML>".
>
> Because it's multiline, java never knows how much lines it contains and what
> is initial height of that component. When I add this do panel and show on
> the screen, my frame has to small height and hides some components. General
> problem is that I use different fonts (almst blind user can select bigger
> fonts).
>
> code:
> -------------------------------
> FormLayout layout = new FormLayout("fill:500px", // kolumny
> "p, 10px, p, 10px, p, 7px, p, 7px, p, 10px, p"); //
> wiersze
>
> PanelBuilder builder = new PanelBuilder(layout);
> builder.setDefaultDialogBorder();
> CellConstraints cc = new CellConstraints();
>
> ...........
> builder.add(textArea, cc.xy(1,3));
> ...........
> getContentPane().add(builder.getPanel());
> pack();
>
>
> Can anyone help me ?
>
> Tom
>
>

You may want to ask this question at the JGoodies support groups. You
will get a quick answer from the developer. You just need to get a free
'java.net' account to submit questions.

https://forms.dev.java.net/servlets/ProjectMailingListList

It is email***@***.com

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)