JMenuItem text doesn't align properly

Please look at the code below:
import javax.swing.*;
import java.awt.*;
public class TestJMenuItem extends JFrame {
    public TestJMenuItem() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JMenuBar jmb = new JMenuBar();
        JMenu jm = new JMenu("File");
        JMenuItem jmi = new JMenuItem("New");
        jmi.setMaximumSize(new Dimension(80, 30));
        jmi.setMinimumSize(new Dimension(80, 30));
        jmi.setPreferredSize(new Dimension(80, 30));
        jmi.setHorizontalAlignment(SwingConstants.RIGHT);
        jm.add(jmi);
        jmb.add(jm);
        setJMenuBar(jmb);
        pack();
        setSize(new Dimension(400, 400));
        setVisible(true);
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                TestJMenuItem tjmi = new TestJMenuItem();
}If you click on "File" menu item, the "New" JMenuItem text seems to go out of the menu item's boudaries. As you can see, I've set the alignment to SwingConstants.RIGHTSetting it to SwingConstants.LEFT leaves a lot of gap from the left edge of the menu item. What am I doing wrong here?
Thanks,
Peeyush Garg

multi-post: http://forum.java.sun.com/thread.jspa?threadID=5143917&tstart=0

Similar Messages

  • Arabic text doesn't render properly when export to PDF

    Hi
    I am having problem with exporting Arabic text to pdf and it doesn't render properly. The whole content render properly expcet the white space; the funny charater has been replaced to white space.
    Does any one having that problem?
    Note: I have tested with using both Crystal Report Designer XI and Crystal Report 2008 which come out same result.
    Thanks,
    Yin

    Morning Yin,
    Did you have any luck with the download? The link I sent you does not need to download using username and password.
    Additionally I doubt if your company would know what your username and password is for SAP as you got to request SAP to get one.
    here is the link to the registration page.
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/new_user_pass/infouser_request.htm]
    Register yourself first and then you will receive the username and password for it.
    Hope this helps
    Regards
    Jehanzeb

  • Certain pages text doesn't appear properly--how do I reset

    On Certain pages (craiglist.com) the text doesn't appear correctly...the best way to describe it is the text appears as strange characters and is illegible. In addition, the characters are squished together. Is there a way to reset something? I've already tried emptying the cache, reset safari, enlarging/reducing font size.

    Make sure you get rid of the fonts Helvetica Fractions and Times Phonetic if you have them. Also clean your font caches with FontFinagler (use Google to find it).
    If you still have problems, send me a screenshot (tom at bluesky dot org).

  • CSS - main content h1 and p text doesn't display properly

    Hi all,
    I know this is something really simple, but I just can't seem to get it right.  The h1 and the p text in the main content should have left and right padding to display properly (i.e. space on either side so it's not squished against the Accordion Spry), but it doesn't work.  It shows correctly in DW, but not online.  I'm just learning CSS so sorry for the ignorance!  I've tried everything I know and can't seem to get it right.  I would appreciate ANY help at all.
    http://www.TailgatorsHockey.com/news.html
    Attached is the .css file...
    Thanks so much!

    The padding and margin are certainly showing in the browser for the h1 tag but you have no padding or margin declared in your css styles for the paragraph tag in the 'main-content' <div>
    Add ths to your css styles:
    #main-content p {
    padding: 0 25px 0 25px; /*top/right/bottom/left*/
    margin-left: 10px;

  • Quicktime w/ composited text doesn't encode properly

    I've created an Applescript that will get the dv datecode and create a quicktime movie with the texted added as an additional video track (composited over the dv footage). It plays back and looks fine in Quicktime Player and the iDVD previews, but when the assets are encoded, the text track doesn't display.
    Does anyone have any ideas about how to achieve this? I've tried ffmpegx, which will encode the video somewhat properly,but the aspect ratio is incorrect.
    Thanks.
    Tim

    I've created an Applescript that will get the dv datecode and create a quicktime movie with the texted added as an additional video track (composited over the dv footage). It plays back and looks fine in Quicktime Player and the iDVD previews, but when the assets are encoded, the text track doesn't display.
    Does anyone have any ideas about how to achieve this? I've tried ffmpegx, which will encode the video somewhat properly,but the aspect ratio is incorrect.
    Thanks.
    Tim

  • Overlaid text doesn't render properly in the iPad

    Overlaying text on top of already rendered areas causes erratic rendering on the iPad. These are NOT issues on Sarari running on my Windows 7 desktop.
    Issue 1 - the overlayed text renders correctly but at the end of the loop doesn't re-render
    Issue 2 - the overlayed text renders correctly but doesn't allow the rest of the movie to play.

    Morning Yin,
    Did you have any luck with the download? The link I sent you does not need to download using username and password.
    Additionally I doubt if your company would know what your username and password is for SAP as you got to request SAP to get one.
    here is the link to the registration page.
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/new_user_pass/infouser_request.htm]
    Register yourself first and then you will receive the username and password for it.
    Hope this helps
    Regards
    Jehanzeb

  • Devanagari/Hindi Text Doesn't Render Properly

    I was so hoping that HIndi text would render properly with the 3.0 upgrade. Sadly it is still broken.
    I encourage folks to report this:
    http://www.apple.com/feedback/iphone.html
    Ideally it would be great to have a keyboard input method, but it is sort of embarrassing that the iPhone can't render web pages (like www.bbc.co.uk/hindi/) correctly.

    Morning Yin,
    Did you have any luck with the download? The link I sent you does not need to download using username and password.
    Additionally I doubt if your company would know what your username and password is for SAP as you got to request SAP to get one.
    here is the link to the registration page.
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/new_user_pass/infouser_request.htm]
    Register yourself first and then you will receive the username and password for it.
    Hope this helps
    Regards
    Jehanzeb

  • Right tab doesn't align properly when using leading decimals (for TOC)

    I have a problem. I'm using the latest version of Pages. When I create a table of contents and use the right tab with leading decimals, they don't align straight on the right side. No matter what I do, they are always off a bit.
    I also have MS Word, and I can do the contents with right tab just fine with no problems.
    Any ideas?
    Thanks,
    Bryan

    Ok just found a workaround/solution.
    (always happens right after I ask, for some reason).
    Rescaled my project but kept the size and positions the "same and centered".
    Then I replaced all my background images with bigger versions (previously I had cropped them at the right and bottom).
    Now my backgrounds were all great, but all my objects were too low.
    All I had to do was ctrl+A to select everything on a slide, and then change the Y value for the whole bunch to zero.
    This magically placed all objects in their correct respective spots.
    Hope that helps someone out!
    Russ

  • Screen doesn't align properly when closed on my NEW macbook

    It is slightly out towards the right hand side. Like my old powerbook was after I dropped it once. I have NOT dropped this one. Should I return it? Could I return it?

    Ring apple 0800 039 1010 for free, it clearly isnt an acceptable fault.
    They'll put you through to someone that'll help.
    I'm sorry to hear this, but good luck.

  • 3.1 upgrade problem:  Post Element Text does not align properly - DUPLICATE

    Duplicated in error - problem with browser. Please remove this one.
    Thank you.
    Message was edited by:
    Thomas 8246

    Duplicated in error - problem with browser. Please remove this one.
    Thank you.
    Message was edited by:
    Thomas 8246

  • Alignment guides doesn't work properly in Pages and Tables

    Drag out a horizontal and vertical guide and align the center of a square to them. When you zoom in to 400%, you can see, that the object doesn't align properly. The guides should divide the square in to 4 equal sized small squares. But they don't!!!

    Not sure if this is the same issue as listed above, but I've had continuing issues with dragging currently playing songs into playlists. It shifts the Spotify window to the lower part of my screen. Always. In order for this NOT to happen, I have to click on the song title (currently playing) - and then click and drag it to my playlist. It's almost like Spotify thinks I want to drag and drop the song to my desktop. It's really really really annoying. Another issue I've been having is when I drag the song, the whole Spotify window freezes momentarily (sometimes longer). What's going on? There are regular updates yet neither of these issues have been addressed. Platform: Mac OSX / Yosemite / Macbook Retina Pro Current Spotify version: 1.0.11.134.ga37df67b Please let me know if anyone else shares this problem and/or knows a solution.If you need additional user info, please advise. 

  • Some text on websites doesn't display properly

    Some text doesn't appear correct in Firefox (but does in IE). The text appears to get jumbled or scrambled but if I cut and paste the text from Firefox to a text file, the text is normal so it must be something in the display setting. The link below is a screenshot of Firefox.
    [http://www.pkhlineworks.ca/screen.jpg]
    Any ideas what is causing this?

    This issue can be caused by an old bitmap version of the Helvetica or Geneva font or (bitmap) fonts that Firefox can't display in that size.<br />
    Firefox can't display some old bitmap fonts in a larger size and displays gibberish instead.<br />
    You can test that by zooming out (View > Zoom > Zoom Out, Ctrl -) to make the text smaller.<br />
    <br />
    Uninstall (remove) all variants of that not working font to make Firefox use another font or see if you can find a True type version that doesn't show the problem.<br />
    There have also been fonts with a Chinese name reported that identify themselves as Helvetica, so check that as well.<br />

  • Why doesn't my dock connector align properly

    For as long as I can remember having my 4S, the dock connector has not aligned properly. I've tried different cables and accessories, I've inspected the port and can not seem to see how it is doing it.
    In the photo you can see the left (image top) is in further then the right (image bottom), if i apply pressure to the right when plugging it in then the left will sit out further. It's almost as if there is something in the middle that is stopping the connector going all the way in.
    Has anyone had or heard of this happening and how was it fixed?

    Sorry, I just realized I had "Increase Contrast" on under Accessibility settings. Solved my own problem. Feel free to delete or ignore this.

  • Content not aligning properly?

    I'm Having trouble getting my content to align properly, it looks right in dreamweaver but when I put it (doesn't matter what internet browser) it is not aligned the same way it is in dreamweaver. The site is www.thecrowdedroom.ca It's pretty obvious what isn't linging up.... The nave container the page identifier and the page content
    Here's my code, I've put the code for the style sheets below the source code
    SOURCE CODE:
    <html>
    <head>
    <title>crowded room - home</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="stylesheet1.css" rel="stylesheet" type="text/css">
    </head><center>
    <body>
    <div id="container">
    <div id="navbar" align="left">
            <ul>
                <li><a href="CRhome.html"><img src="images/home-button.jpg" alt="Home" width="75" height="23" border="0"></a></li>
                <li><a href="CRprojects.html"><img src="images/projects-button.jpg" alt="Projects" width="87" height="23" border="0"></a></li>
                <li><a href="CRinfo.html"><img src="images/rundown-button.jpg" alt="Info" width="131" height="23" border="0"></a></li>
                <li><a href="CRcontact.html"><img src="images/contact-button.jpg" alt="Contact" width="89" height="23" border="0"></a></li>
            </ul>
    </div>
    <div id="display">
      <img src="images/home-display.jpg" width="182" height="34">
    </div>
    <div id="content">
    Welcome to the Crowded Room<br><br>
    Home of Web Developement, Media Production, and Event Planning<br>
    Take a look around, check out our current and past projects  
    </div>
    <div id="footer">
      Copyright © 2009 CROWDED ROOM PRODUCTIONS. All rights reserved
    </div>
    <this is the container div nothing goes below it>
    </div>
    </body></center>
    </html>
    STYLE SHEETS
    #container {
        background-image: url(images/CRhome.jpg);
        background-repeat: no-repeat;
        height: 800px;
        width: 800px;
        margin-top: 30;
        margin-right: auto;
        margin-left: auto;
    #container #navbar ul  {
        list-style-type: none;
        clip: rect(auto,auto,auto,auto);
        height: 4px;
        width: 100px;
    #container #navbar ul li {
        margin-top: 6px;
    #navbar {
        height: 100px;
        width: 100px;
        float: none;
        margin-top: 202px;
        margin-left: 50px;
        position: absolute;
        left: 254px;
        top: 87px;
    #display {
        position: absolute;
        left: 311px;
        top: 630px;
    #content {
        letter-spacing: normal;
        text-align: left;
        word-spacing: normal;
        overflow: auto;
        height: 122px;
        width: 760px;
        margin-top: 635px;
        padding-top: 20px;
        padding-right: 20px;
        padding-left: 20px;
        position: absolute;
        font-family: "Myriad Pro";
        font-size: 14px;
        font-style: normal;
        line-height: 25px;
        vertical-align: middle;
        left: 284px;
        top: 30px;
    #footer {
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size: 9px;
        height: 14px;
        width: 800px;
        position: absolute;
        text-align: center;
        left: 283px;
        top: 785px;
        margin-top: 30;
        margin-right: auto;
        margin-left: auto;
    #contentpic {
        letter-spacing: normal;
        text-align: left;
        word-spacing: normal;
        overflow: auto;
        height: 150px;
        width: 200px;
        margin-top: 635px;
        padding-top: 20px;
        padding-right: 20px;
        padding-left: 20px;
        position: absolute;
        font-family: "Myriad Pro";
        font-size: 14px;
        font-style: normal;
        line-height: 25px;
        vertical-align: middle;
        left: 12px;
        top: 32px;
    #contentwordpic {
        letter-spacing: normal;
        text-align: left;
        word-spacing: normal;
        overflow: auto;
        height: 150px;
        width: 560px;
        margin-top: 635px;
        padding-top: 20px;
        padding-right: 20px;
        padding-left: 20px;
        position: absolute;
        font-family: "Myriad Pro";
        font-size: 14px;
        font-style: normal;
        line-height: 25px;
        vertical-align: middle;
        top: 31px;
        left: 214px;

    http://www.thecrowdedroom.ca 
    I can tell you that having no document type declaration (DTD) on the first line of your HTML docs is not a good thing and sends your page into Browser Quirks Mode.
    DW   automatically applies a doc type to new pages so you may have copied & pasted this code  from someplace else ??
    To fix this problem, Go to File Menu > Convert > Select a Doc type that fits your coding skills.  Either XHTML or HTML (transitional).
    HINT:  It's a good idea to use HTML heading <h1> <h2> <h3> or paragraph <p> tags around your text content for search engines to find.  Heading 1 carries greater importance than heading 2 and so on...
    Related Links:
    HTML Validator - http://validator.w3.org 
    CSS Validator - http://jigsaw.w3.org/css-validator/  
    HTML & CSS Tutorials - http://w3schools.com/
    Creating  your first website in DW CS4 -
    http://www.adobe.com/devnet/dreamweaver/articles/first_cs4_website_pt1.html
    Good luck with your project,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • My palm m105's touch screen doesn't work properly after a sync.

    I dug out my old m105, put new batteries in and start it. On first launch it auto runs the alignment tool, and after touching all the points it goes to the main screen and works fine. No problem till here.
    Now, I plug it into my old computer which still has the palm software with my apps, and I run the sync operation (from the palm device sync manager, cause I lost my cradle and I'm connected via the serial cable), and it syncs fine BUT, here comes the problem, when it finishes the sync (successfully) the touch screen is all misaligned. I can't go back to the home screen or do anything useful.
    My palm m105's touch screen doesn't work properly after a sync.
    I dug out my old m105, put new batteries in and start it. On first launch it auto runs the alignment tool, and after touching all the points it goes to the main screen and works fine. No problem till here.
    Now, I plug it into my old computer which still has the palm software with my apps, and I run the sync operation (from the palm device sync manager, cause I lost my cradle and I'm connected via the serial cable), and it syncs fine BUT, here comes the problem, when it finishes the sync (successfully) the touch screen is all misaligned. I can't go back to the home screen or do anything useful.
    Thanks in advance!
    Post relates to: Palm m105
    Post relates to: Palm m105

        Maldoman578,
    Let's help solve this mystery together! Is your screen freezing after every reboot? Is there any physical/liquid damage on the device? When did this issue begin? Did you notice this after a recent update or application download?
    EfrainM_VZW
    Follow us on Twitter @VZWSupport

Maybe you are looking for

  • WD External Drive Won't work with Time Machine or anything else

    I am really hoping someone can help me. I have been using Time Machine to backup my hard drive on my Macbook and using a WD drive. Everything worked until right before Christmas. Something happened and I don't know what and I am not sure the last bac

  • Failed to update Versamail on Centro

    Hello, I've tried to update the Versamail by downloading the latest version from www.palm.com/us/support/downloads/versamail/vm4updater.html directly to my Centro I followed all the instructions, succeeded to download, but when I reached the step whe

  • Save Illustrator PDF for unknown usage

    Does anyone have any thoughts/recommendations for how to best save an Illustrator file as a PDF when the end use of the PDF is unknown? Here's the context: I'm designing a logo in for a client who is not currently working with any specific printer an

  • How to transform java3d picture to ".jpg" or ".gif" in the Ram?

    Transform the "scene" (BranchGroup) picture to ".jpg"

  • Install right click tool and client troubleshooting tools.

    Hi Everyone, I need some information, I heave 2012 native mode environment with MacAfee firewall. But I need to install rite click tool and client troubleshoot tools. It is possible or not, if yes  Please give me the detailed Information. Thanks in a