Whole label does not show

I need to add some labels to my GUI. I have a special font I would like to use, and I've created a subclass to JLabel that overrides the paint() method so that the text will be antialiased.
public class SmoothLabel extends JLabel{
     public SmoothLabel(String str) {
          super(str);
     public void paint(Graphics g) {
          Graphics2D g2 = (Graphics2D) g;
          g2.setRenderingHint(
               RenderingHints.KEY_TEXT_ANTIALIASING,
               RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
          g2.setRenderingHint(
               RenderingHints.KEY_FRACTIONALMETRICS,
               RenderingHints.VALUE_FRACTIONALMETRICS_ON);
          super.paint(g);
}Then when I add the labels to a panel with the BoxLayout as layout, the two last letters of the text is replaced by 3 dots. It does not matter how long the text is (unless its very short), the end is always replaced by 3 dots. Of course I can add some blanks to the end, but that does not look very nice. Here's the method that returns a panel with all the labels.
private JPanel createBookIndex() {
     JPanel p = new JPanel();
     p.setOpaque(false);
     BoxLayout boxLayout = new BoxLayout(p, BoxLayout.Y_AXIS);
     p.setLayout(boxLayout);
     Iterator itr = library.iterator();
     while(itr.hasNext()){
          Book book = (Book) itr.next();
          JLabel label = new SmoothLabel(book.getText());
          label.setBorder(BorderFactory.createEmptyBorder(15, 30, 0, 0));
          label.setFont(SMALL_FONT);
          label.setOpaque(false);
          p.add(label);
     return p;
}Anyone have an idea of how to solve this? If I change the labels to JLabel instead of SmoothLabel, the problem does not appear. And I don't think it appears if I dont have a layout either, but I'm not sure on that one...
I've tried to change the size of booth the panel and the labels, but without any success.

This is so strange... I don't even know how to describe it properly...
It does not work fully, but....
My program is basicly a kind of a library, where you should be able to add books. Each book contains chapters, and each chapter contains pages with entries.
At the start of the program, it will list all the books in the library. When I do that, the titles of the books gets their end replaced by dots.
Then when you click on a book, it will open and a list of chapters appears. It is the same method that display the list of books that displays the list of chapters of a book.
But when the chapters are displayed, the 3 dots at the end does NOT appear. See the method below...
     private JPanel createIndexPanel(LinkedList list) {
          JPanel p = new JPanel();
          p.setOpaque(false);
          BoxLayout boxLayout = new BoxLayout(p, BoxLayout.Y_AXIS);
          p.setLayout(boxLayout);
          Iterator itr = list.iterator();
          while (itr.hasNext()) {
               Object o = itr.next();
               JLabel label = null;
               if (o instanceof Book) {
                    label = new SmoothLabel(((Book) o).getName());
                    label.addMouseListener(new LabelListener((Book) o));
               } else if (o instanceof Chapter) {
                    label = new SmoothLabel(((Chapter) o).getName());
                    label.addMouseListener(new LabelListener((Chapter) o));
               } else if (o instanceof Page) {
                    label = new SmoothLabel(((Page) o).getEntry());
                    label.addMouseListener(new LabelListener((Page) o));
               label.setBorder(BorderFactory.createEmptyBorder(15, 30, 0, 0));
               label.setFont(SMALL_FONT);
               label.setOpaque(false);
               p.add(label);
          return p;
     }Any more ideas? I've never seen anything like this before...

Similar Messages

  • Viewer does not show all of the clip

    Import routine:
    MTS format from Canon > Converting to Quicktime with Voltiac software. Resolution 1920x1080.
    Impossible to set correct In and Out points in the Viewer as the whole clip is not shown. Can change the duration of the clip in the Timeline as the whole clip is shown there. After rendering there are no problems in the Canvas.
    Anybody got a solution? Would be much appreciated!
    Regards,
    Tryg

    I'd be converting to 1440x1080 because FCE does not support 1920 without rendering.
    At any rate, why the whole clip does not show up in the Viewer and does in the Canvas eludes me.
    Al

  • Finder does not show all colors from selected color Labels

    Since a view days finder does not show all Color Label colors. When I select either yellow or green it is selected, but it does not show in the file list with details, I can see it in icon and 3 pane view, but not in the detail list view.
    does anybody know why or how? Or what plist files I might need to delete to get this reset?

    Create a new account, name it "test" and see how your labels work in that User acct in list view? (That will tell if your problem is systemwide or limited to your User acct.) This account is just for test, do nothing further with it.
    Open System Preferences >> Accounts >> "+" make it an admin account.
    Let us know and we'll troubleshoot this further.
    -mj
    [email protected]

  • Vertical ComboBox does not show its selected Item's label

    Hello,
    We have created a custom vertical ComboBox.
    Normal combobox has been rotated to -90 degrees.
    It aims to show its selected label and open up the menu at proper x,y coordinate.
    To open up the menu at proper x,y coordinate, we have overriden "downArrowButton_buttonDownHandler" function to move the dropdown accordingly.
    However, the selected label is not visible on screen. Rotated text does not show up without embedding fonts. Hence, We have tried embedding font for the same. It doesn't work though.
    Please help.
    Regards,
    Tanu

    Embedded font isn't working for rotated button/combobox. Though, it works fine with rotated label
    Please refer to below given code:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Style>
         .mystyle1 {
            fontFamily:myPlainFont;
            fontSize: 32pt;
      </mx:Style>
      <mx:Script>
          * Embed a font by name.
         [Embed(systemFont='Arial',
            fontName='myPlainFont',
            mimeType='application/x-font'
         private var font1:Class; 
      </mx:Script>
      <mx:Panel title="Embedded Fonts Using ActionScript">
         <mx:VBox>
            <mx:Label            
                styleName="mystyle1"
                text="Embedded font"
                rotation="15"
            />      
            <mx:Button             
                styleName="mystyle1"
                label="Embedded"
                rotation="15"
                />
         </mx:VBox>
      </mx:Panel>
    </mx:Application>
    Regards,
    Tanu

  • HideShow: Column does not show label

    I have one hideShow region inside table, but it does not show label in column.
    Someone know help me?
    See the printscreen: http://www.flickr.com/photos/30358105@N03/3180588230/

    Hi,
    Under the “Identification” tab, there is a characteristic 0PSTNG_DATE. The corresponding 4th column is for Cube1, but Cube2 contains the posting date we are reporting on through the multiprovider. The third column  (“Equal To”) is NOT checked for Cube2.
    Could that be the problem? What is the significance of this checkbox not being checked for Cube2.
    On the other hand, I see 0PSTNG_DATE also under the fifth column (Char/NavAttrib), but the corresponding Cube3 and it is checked under “Equal To”
    Characteristic---Long_Description-Equal_To-In_InfoProvider-Char/NavAttrib
    0PSTNG_DATEposting dateCube1--
    Cube1
    Cube2               
    Cube2
    checked---Cube3--
    0PSTNG_DATE
    Cube3
    0FISCPER3-----Posting period---checked----Cube1             
    checked----Cube2               
    checked----Cube3               
    Checked----Cube4
    I hope the above info can from the Identification tab guide help?
    Can you help interpret these columns and the significance of the fact that there is no “checked” under “Equal To” for the Cube2 which is what actually feeds the column, TargetColumn (i.e the column which does not get populated with date when the Posting Date filed is set.
    Thanks.

  • Double clicking a new e-mail does NOT show whole e-mail

    double clicking a new e-mail does NOT show whole e-mail unless I go to forward or reply. In other words, I may see a couple sentences, then it's just blank, no scroll bar either. This gets annoying. Anybody else get this or know how to overcome this?
    eMac 800mHz   Mac OS X (10.4.6)  

    Well, there is no such thing as an AOL type account in Mail. Such an account must be set up as either POP or IMAP. Nevertheless, knowing that the ISP for one of the accounts is AOL is useful because it seems that other people also have this problem with AOL -- see Chuck Coulson's and smackwell's posts in this thread.
    I don't think I'll be able to help you with the AOL account other than telling you to try rebuilding the mailbox -- select the mailbox and choose Rebuild from the Mailbox menu. Have you tried that?
    The problem shouldn't happen with the POP account, however. Do you experience the same problem with it as well?

  • HT1296 I want to transmit my whole iTunes library (about 4GB) to my iPod. When I click "sync," the window goes quickly through the steps and quits, but the music does not show up on my iPod. It says "no music." I have followed the instructions, but no res

    I have followed instructions for transferring my iTunes library from my MacBook Pro to my iPod. The summary window shows lots of unused memory and it partly fills when I hit "sync," but then returns to nearly empty and the music does not show up on my iPod--"no music." Any suggestions would be appreciated. l've read all the instructions I can find. Thanks.
    macsept

    Check your settings.
    iTunes 11 for Mac: Set up syncing for iPod, iPhone, or iPad
    Have you successfuylly synced from this iTunes library/computer before?

  • I've a new account on iMac.  When composing an email the contact list does not show up on the bar.  WWhen I start keying in a name, it comes up with the address.  How do I engage the  contact list from the email?

    I've a new account on iMac.  When composing an email the contact list does not show up on the bar, which would allow me to select the persons I want to include on the distribution of the email.  When I start keying in a name in the email, it comes up with the person's address, which shows it is synced.  How do I engage the contact list from the email like I do on my old account (where a contact list icon shows up, along with the "attach" and other icons) ?

    With the New Message window open, go to the View menu and select "Customize Toolbar...".
    In the screen that opens, drag the item labelled "Address" into the Toolbar area of the New Message window, then click the "Done" button.
    That item should be then added to the Toolbar for the New Message window.
    Note that the main Mail window and the New Message window (as well as the separate message window if you open a message that way) use different toolbars - the settings/inclusions for one do not carry over to another.

  • HT1349 I have registered with my local library and can download books.  But these are not being shown in ITunes, the Library does not show 'audiobooks'.  I have an ipod 6G.  can anyone help please?

    I have recently purchased (from the States) an ipod nano 6th generation.  I belong to a local library and can download books from the audiobooks online section.  Problem is, my iPod when synced to iTunes, does not show Library as a category and audiobooks.  For some reason, it is allowing me to download the books to my iPod, but I am unable to delete them from the iPod, and also, it is giving an echo (I think somehow it is downloading twice which is giving an echo effect).  Not sure what is going on, but if anyone can advise me on this I would be very grateful.

    Hello mrsbonniesue
    If you have an issue with the audiobook showing up in music, check to see if those tracks are labeled as audio books or music. The article below will explained as well as I have highlighted the main portion for changing that information.
    iTunes 11 for Windows: Edit song and CD information
    http://support.apple.com/kb/PH12360
    Identify an item that you imported from a CD as an audiobook, so it appears under Audiobooks instead of Music (click the Options button and choose Audiobook from the Media Kind pop-up menu). If you do this, iTunes also remembers your place in the audiobook
    Regards,
    -Norm G.

  • Fiscal Year / Periods does not show properly in WebI and compunding

    Hi,
    I have few reports where I am using Fiscal Year /Period as filter.
    I have created a Universe on the top of a SAP BI Query and did not do any customization.
    Then I created a WebI report. In this report I created various filters beside Fiscal Year / Period. When I run report, filter window opens. I can select all other filters but when it comes to Fiscal Year / Period it does not show me the values I want to see. It shows AUG 0001, APR 0025 etc. I want to see AUG 2010, MAR 2009 etc so that I can select them and get the data of the required Fiscal Year / Period. In Cube I have the required data. If I select MAR 0010 etc I donu2019t get any data.
    On the other hand if I put fiscal Year / Period in columns or rows it shows the right value.
    If also run SAP BI Query and Fiscal Year / Period in Variable then on variable screen I can see the right value from where I can select and get the required result.
    Do I have to do any step at Universe level or something else?
    It seems that Fiscal Year / Period is compounding.
    Is there any help?
    Thanks
    Bashir Awan

    Ingo,
    for thanks for igniting my thoughts in this regards.
    Yes these values do exist in SAP BW.
    It is some how compunding the values at filter level.
    It does not let me see the whole value when filter screen popup in BOBJ.
    In SAP whole value shows when variable screen popup, I see three columns Fiscal Year / Period. Text, Posting Period Key, and Posting Year Key.
    Fiscal year / Period Text which shows Aug 2009, Posting Period Key which shows our period 1 to 16, and Fiscal year key which shows 2009 etc.
    Is there any setting in BOBJ which compunds the year for variable screen so that we may see the whole values for filters?
    thanks

  • Why some times jdeveloper does not show a coreect design view ?

    Hi
    thank you for reading my post
    why jdeveloper does not show a correct design view of jsf pages sometimes?
    It does not shows labels and ... , just show tag names like : form , ... ?
    here is a picture for this :
    1-incorrect page:
    http://www.flickr.com/photos/59086726@N00/217556594/
    2-correct page :
    http://www.flickr.com/photos/59086726@N00/217556595/
    I just closed and open the IDE and page designer shows incorrect pages
    thanks

    Also try this...go to the project properties for the View project. Look at the JSF Libraries and remove the two JSF libraries and then re-add them....this sometimes helps.
    Regards
    Grant Ronald

  • HT4972 My IPad 2, IPhone 3GS ans iPod  no longer work with apple TV, I have 2 apple TV in my house and for he last 3 weeks the iPod was the only one we could use for appleTV now none of them works, the apple TV icon does not show up any more. Re-startedev

    My IPad 2, IPhone 3GS ans iPod  no longer work with apple TV, I have 2 apple TV in my house and for he last 3 weeks the iPod was the only one we could use for appleTV now none of them works, the apple TV icon does not show up any more. Re-started everything.

    Ok thank you so much, for your timely response.
    RESPONSES:
    1)   When I set up my iMac, I did not transfer any data directly from my windows PC.  I simply used the same iTunes login and account.  I have access to all of the files via the "Purchased" section of the iTunes store.  If I click "Download Previous Purchases"  text, I can download ALL of the purchases I have ever made.
    2)   I have the Apple TV 2, so good news, question answered.  I thought maybe it was the Apple TV 1, but it is the Black model, so bam.  Good response for you.  Well the whole damned reply is an awesome response, just pointing out that one piece of awesome.  I stated that it was an Apple TV 2, and yet you were still good enough to figure I could be mistaken, and provide me with knowleedge just incase.
    QUESTIONS:
    3)   So can my iMac not stream the data directly from itunes, without download?  Apple TV can, but perhaps that is something among many things that maker it unique, and awesome.
    SERIOUSLY.... THANK YOU... 
    I work in the computer support section for the Military.  The only problem is we use Windows , lol.  Well that and i've been gone for nearly 6 months on recover.  I go back next month though I hope.  But working in that field gives me the abilty to judge responses that run inside the same vein.  Your response was so awesome that I half thought I might have written it myself. 

  • HT4044 Part of my iPad(1st gen) screen display does not show,hence I can only see it partially.It was not dropped and neither is it broken. Any help as I was told it cant be fixed and i hv 2 replace with a new unit i.e. pay in full as warranty is over? HE

    Part of my iPad screen display does not show. It was not dropped and neither is the screen broken. I was advised to see the local service provider for a diagnosis.
    I had finally managed to find time to find a local service provider last week (not easy) and was disappointed to be advised of Apple's policy of one for one exchange i.e. they wont repair and said that i would have to replace with a whole unit. As my unit is no longer under warranty, it meant that I had to pay for the full price of a new unit!
    I might as well have paid for the latest new unit but since my unit is only 2 years old at most, it would be a great waste of money.
    How can this be? Does this mean apple's product is inferior and do not last since warranty is only for one year?
    I sincerely hope there is a favourable solution otherwse my money is flushed down the drain.
    HELP!!!

    I was using my iPad last night, shut the power off and when I turned it on this morning 2/3 of the screen is not working.  It looks like the pandalela picture. What is the answer to fix this; is this a screen issue or and electronics issues.  Has anybody else experienced this?

  • HT201774 my SENT mail does not show up in my iphone

    my SENT mail does not show up in my iphone and will not sync with the rest of my mail

    IF you are talking about Exchange on Google with Gmail (ie chose exchange and using m.google.com) here is what I did to fix it.
    Using your browser, sign into Gmail.  IF, NEAR THE BOTTOM of your folder lists, you have a label(folder) on the left side called "Sent Items" then delete it (mine never had anything in it and i think it's for conversations.)  BTW, I KNOW this is a Junk E-Mail (remember i already deleted my folder) but wanted to show you the drop down and Remove Label option.
    Then go to your  Settings -> Mail, Contacts, Calendars -> Exchange -> Mail Folders to Push -> and put a checkbox next to SENT (looks like a paper airplane)
    backout, go back into mail -> Exchange -> and you should then see the same paper airplane there.
    What was happening with mine was it would show up and then disappear as soon as it synced.  The only thing i can think of is that GMAIL has a folder called SENT xxxxx (that I deleted above) that confused the iPhone and i believe it's for Messages not Mail (via google talk)
    Once that was deleted, Voila!  No more missing sent mail.  Also, it has showed up on my iPad again.
    Hope this helps.

  • Changes made in symbol does not show?

    Hi, I recently started working with adjusting a template with flash 8. Everything went smoothly except for one thing. I changed one certain symbol in my libray and when i exported the movie (after changing) i dont see the changes in my website. Other buttons, symbols etc immediatly show there adjustments and this just keeps on remaining the same? Anybody knows what to do with this? Please reply!

    Hi,
    I tried clearing the cache before. No success. The symbols that does not
    seem to change are on the website. I searches the whole library and the
    page i want to change i nowhere to be found (except for the symbols that
    does not show the changes). I hope to hear from you (and anyone) soon!
    2012/2/17 kglad <[email protected]>
       Re: Changes made in symbol does not show?  created by kglad<http://forums.adobe.com/people/kglad>in
    Flash Pro - General - View the full discussion<http://forums.adobe.com/message/4213017#4213017>

Maybe you are looking for

  • I need to plug ins extract for photoshop cs5

    I am happy to use photoshop cs 5 but my cs 5 do not have plug ins extrac to crop my on ap lioa and crop my images on ap standa in my website. So I have seached innternet to install . Now you can help me to find that plug ins to use for my work. Thank

  • Icon in system prefs not displaying correctly

    In the system prefs pane, the speech icon is being dispayed as a box with a light switch and the text cut off. Any ideas on how to get this back to the original microphone. Thanks.

  • Mail failed to import after Mavericks upgrade

    Just upgraded to Mavericks and have all current updates - went to open mail and got the following message: Mail failed to import. An error occurred during the import. Make sure you have available space in your home folder and try again. I have a pret

  • Switching from a PC server to a MAC

    Hello, I've finally convinced my office to switch our PC server to a MAC server. About half the computers that will be on this network are MAC and Half are PC. I have a couple small questions/issues. 1) will the PC's be able to access everything the

  • Adobepdf.dll missing when 99% of Adobe Creative Suite 5.5 Web Premium is installed?

    99% Installed on Adobe Creative Suite 5.5 Web Premium then received an error window:  The file AdobePDF.dll on Adobe Acrobat CD-ROM is needed.  Type the path where the file is located, and then click O.K.  Browse to the file and copy files from it. P