Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2003

Tip: Looking for answers? Try searching our database.

'W' cropped on JLabel

Thread view: 
VisionSet - 09 Dec 2003 03:37 GMT
Somehow my labels with a leading 'W' when left aligned, lose a couple of
pixels off the left.
No ammount of pack() or validate() fixes it.
It is the same across metal & windows L&F's, but okay in CDE/Motif.
Note this is only when left aligned, they are fine in the center.

Anyone recognise this problem?
How do you fix it?

Signature

Mike W

Filip Larsen - 09 Dec 2003 07:30 GMT
> Somehow my labels with a leading 'W' when left aligned, lose a couple of
> pixels off the left.

I have noticed that too. So far I have used the easy but not very
satisfying work-around of simply adding a space in front of the string
to display.

Regards,
Signature

Filip Larsen

VisionSet - 09 Dec 2003 14:28 GMT
> > Somehow my labels with a leading 'W' when left aligned, lose a couple
> of
> > pixels off the left.

1 Pixel actually.

> I have noticed that too. So far I have used the easy but not very
> satisfying work-around of simply adding a space in front of the string
> to display.

Bug Id  4140220

due to fix in 1.5

overide JLabel and do this:

public void paint(Graphics g) {
 g.translate(1,0);
 super.paint(g);
}

Signature

Mike W

Filip Larsen - 09 Dec 2003 21:44 GMT
I wrote

> > I have noticed that too. So far I have used the easy but not very
> > satisfying work-around of simply adding a space in front of the string
> > to display.

and VisionSet answered

> Bug Id  4140220
>
[quoted text clipped - 6 lines]
>   super.paint(g);
> }

Thank you for the info. I was too lazy to search for it myself on bug
parade :)

Regards,
Signature

Filip Larsen



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.