473,569 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("fil l:500px", // kolumny
"p, 10px, p, 10px, p, 7px, p, 7px, p, 10px, p"); //
wiersze

PanelBuilder builder = new PanelBuilder(la yout);
builder.setDefa ultDialogBorder ();
CellConstraints cc = new CellConstraints ();

............
builder.add(tex tArea, cc.xy(1,3));
............
getContentPane( ).add(builder.g etPanel());
pack();
Can anyone help me ?

Tom
Aug 8 '06 #1
1 5648
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("fil l:500px", // kolumny
"p, 10px, p, 10px, p, 7px, p, 7px, p, 10px, p"); //
wiersze

PanelBuilder builder = new PanelBuilder(la yout);
builder.setDefa ultDialogBorder ();
CellConstraints cc = new CellConstraints ();

...........
builder.add(tex tArea, cc.xy(1,3));
...........
getContentPane( ).add(builder.g etPanel());
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/...ailingListList

It is us***@forms.dev .java.net

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-)
Aug 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5901
by: prabhat | last post by:
Hi, I am getting this weird behavior. I have couple of gif and jpg files that I would like to display in JLabel. It displays one jpg image but it does not display other gifs and jpgs. Any idea why it would do so. Sample code is : JPanel logoPanel = new JPanel(); logoPanel.setLayout(new BoxLayout(logoPanel, BoxLayout.X_AXIS)); ImageIcon...
0
2071
by: Mike | last post by:
Hello, Is there a way of setting text for a JLabel after a certain amount of empty characters. For example, I want to avoid doing this JLabel label = new JLabel(); label.setText(" Book Name =") Thanks
2
7586
by: Jean-Philippe Martin | last post by:
Hi all, It's my first post here, so you doubt I have a question :o) I want to develop a mini graphical editor. Imagine that I have 2 JFrame, I want to have one with a list of JToggleButton with a ImageIcon and one called DrawingAeraWind with nothing into. I would like to be able to draw the ImageIcon of the selected JToggleButton in...
6
3246
by: James Nugent | last post by:
Hi everyone, My app need to manipulate JLabels that have been added to the pane. All I need to do is simple stuff like make them disappear or change their background color. Unfortunately (and only from time to time) I get null pointer exceptions: java.lang.NullPointerException at...
2
25492
by: reon | last post by:
Hi in this code when i clicked login button...it shows output as login... But when i clicked each time its repeating .. i want to see that only ones ... I want to clear the previous login before i clicked... import java.awt.*; import java.awt.event.*; import javax.swing.*;
5
6846
Shinzon
by: Shinzon | last post by:
ok so far I have got: JFrame frame = new JFrame( "Matt's DVD's" ); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); frame.setSize( 420, 170 ); // set frame size frame.setVisible( true ); // display frame JLabel label = new JLabel("Text Label");
5
6909
Shinzon
by: Shinzon | last post by:
Ok so I have been working on this for a moment now and wondering how to add multiple jlabels to a jframe. the code looks like this: JLabel jl = new JLabel("DVD ID #= " + dvd); //Displays DVD id JLabel j2 = new JLabel("Name of DVD = " + dvd); //Displays dvd name JFrame frame = new JFrame( "Matt's DVD's" ); //...
3
2341
nanhiPari
by: nanhiPari | last post by:
hello everyone i need to create DYNAMIC JLABElS(say 5)..yes i know it sounds easy but i also have to give them Events n then want to refer each of them when ever Mouse is Clicked on a Specific Label with its Label Name or Text.. i tried it by...
1
2000
by: tommyny04 | last post by:
I have a method addPlayer that's supposed to add a JLabel to a JPanel and update the JPanel. The JLabel is just a label with a player's name in it. The code I've wrote doesn't work and I'm not sure why. Any help would be greatly appreciated int playerCount = 0; private void addPlayerButtonActionPerformed(java.awt.event.ActionEvent...
0
7701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8130
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7677
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.