JMenuItem icon/Text verticle alignment question

hello,
can some one help with my question:
I got 5 JMenuItems in a JMenu, some JMenuItems have icon, some not, I want to align them with icon and text in a neat format, like those in Sun's Forte IDE's Menu:
but I can only do it like this:
icon1 open..
save As..
icon2 new..
Exit..
(above each line represent a JMenuItem, I need to make "save as" ,"Exit" to in line with "open" and "new" in verticle direction,NOT with the icon)
sb suggest always set an icon for each JMenuItem, set an transparent Icon for alignment those without icons.
but this sounds not so attractive, are there any other ways? thanks a lot.

Create a method to do the icons. One can have one parameter (menu text) and the other could have two parameters (icon name, menu text). Have the one with just one parameter set up a default transparent icon.
Garry.

Similar Messages

  • JMenuItem icon, text alignment question

    hello,
    can some one help with my question:
    I got 5 JMenuItems in a JMenu, some JMenuItems have icon, some not, I want to align them with icon and text in a neat format, like those in Sun's Forte IDE's Menu:
    but I can only do it like this:
    icon1 open..
    save As..
    icon2 new..
    Exit..
    (above each line represent a JMenuItem, I need to make "save as" ,"Exit" to in line with "open" and "new" in verticle direction,NOT with the icon)
    sb suggest always set an icon for each JMenuItem, set an transparent Icon for alignment those without icons.
    but this sounds not so attractive, are there any other ways? thanks a lot.

    you can always take a mort drastic action by subclassing MenuItem and
    overriding the painting method.
    But I belive that the first suggestion is faster.

  • How can I get an Extension's toolbar icon to display image without text (without universally affecting other icons)? How can I edit the icons text (save space)?

    "From the Show dropdown menu, you can choose what to display in the toolbars: icons, text, or icons and text together. By default, Firefox shows icons only." Is there a way to choose an individual setting for a specific toolbar icon to be icon only (no text) without universally affecting all other icons on the toolbars?
    Second, is there a way to edit the text on a specific toolbar button from an extension (because it occupies too much horizontal space on the toolbar due to the amount of text)? I do know how to locate the xpi file & open it with notepad, but then it's mainly code (not English) & FIND doesn't locate the button's text (to edit it).
    These 2 questions should apply to Extension buttons in general. However IF it makes any difference I'm referring to the Toolbar Button in Back To Top 7.0 which says "Go to top/bottom". I'd at least like to edit out "Go to", but my questions apply to other Extension buttons too. I do realize it may be necessary to redo any fix/change each time there is an update? THANK YOU.

    We use the DOM Inspector to find the IDs and Class Names of elements.
    * DOM Inspector: https://addons.mozilla.org/firefox/addon/dom-inspector-6622/
    The DOM Inspector (DOMi) has a menu item (Edit > Select Element By Click) and a toolbar button "Find a node to inspect by clicking on it" (left icon on the toolbar in the DOMi).
    * open the browser window in the DOMi (File > Inspect <b>Chrome</b> Document) and choose the first from the list.
    * click the "Find a node to inspect by clicking on it" button and use the keyboard (Alt Tab) or the Task bar to go back to the browser window (do not click in the browser window other than the title bar).
    * click that element with the mouse and keep the button pressed until you see a red border to indicate the the DOMi has located that element in the DOM tree.
    * https://developer.mozilla.org/en/DOM_Inspector/Introduction_to_DOM_Inspector

  • The icons in the bookmark tool bar are blank and the text that use to be below the icon is gone. I now have to cursor over the blank icons to see the text and the one I want. Can the icon/text customization be returned?

    In the Navigation Toolbar, the icons "Back", "Forward" etc. show the small icon and the descriptive text below the Icon. My Bookmark Toolbar use to have the same icon/text format but at some point, possibly a browser update, that changed. Currently, I do have a visible Bookmark Toolbar BUT the icons do not show the website icon, as previously, and the text below each icon is gone. I an cursor over each icon and the text becomes visible next to the icon. This is a bit of a pain to find a bookmark. Can I do a customization to return to the icon/text format.
    Was this changed because browser users requested this option, or was it an internal decision.? If the later why make such changes when not requested?
    Ed Sander

    That wasn't a change in Firefox. It sounds like something is broken in your Firefox installation, or you are misunderstanding the different between the Bookmarks Toolbar and the other Toolbars.
    In the Bookmarks Toolbar the text appears next to the website icon, not below the icon as with the other two Toolbars, and it's not switchable between text and no text as with the other Toolbars. With both the bookmark icon and the Bookmark name missing, something is broken in your installation. You need to do a little troubleshooting.
    Do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]
    If your problem isn't related to an extension, your bookmarks data base file (places.sqlite) is probably corrupt. <br />
    http://kb.mozillazine.org/Locked_or_damaged_places.sqlite <br />
    Be aware that if you delete the "places.sqlite" and similar files, your bookmark website icons won't automatically appear (the JSON backups don't have that icon data) when you restart Firefox and the places.sqlite is rebuilt using the backup data file, but the icons should be saved the first time each bookmark is used for the first time.

  • My iMac has a blank screen with an icon showing a flashing question mark.  I have rebooted and still nothing but that on the screen.

    My iMac has a blank screen showing an icon with a blinking question mark.  I have rebooted and still the same.  Any ideas?

    Mac OS X: Gray screen appears during startup  BTW, iOS info is useless, post machine and OS version specifics.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • Question Pool Manager text not matching question.

    How can this happen?  I'm using Captivate 5 on Windows XP.  In the image below, the text of the question in the pool does not match what it says in the Pool Manager.  Note the highlighted line on the Pool Manager. It says "Type the question here" while as you can see the actual text was edited to deal with crates and foam.  I have several quizzes with the same problem.  When you take the quiz, all of the questions display fine.  When you look at the quiz result data, several of the quiz questions are listed as "Type the question here."  Anyone got any ideas?
    GBayl

    Hello,
    If you are still seeing this problem, please send me the project file. [thejas at adobe dot com]

  • It is possible to put an icon&text on the table�s header of JTabbedPane?

    Hi
    It is possible to put an icon&text on the table�s header of JTabbedPane?
    Tx
    D

    its not what i'm looking for.
    maybe its a JTabbedPane at all. if yuo know the Emule interface,it seems like all the comnents Connect,Servers,Transffers,etc they all like a combination of a jTogglebuttn and a JTabbedpane.
    can it be a JToolBar and JToggle buttons in it,that has an event that changh the content of the JFrame?
    Tx
    D

  • Icon Text Background Color

    I would like to be able to change the background color of the icon text labels on the desktop in OS 9.2.2. The default color (white) looks strange on some wallpapers. Is there a fairly easy way to do this?
    Thanks very much,
    David

    HI, David -
    The highlight color (tint) can be reset easily via the Appearance control panel, but the non-highlighted (normal) tint for the filename's background color is a different thing.
    I suppose ResEdit could be used for that, but I don't know which resource it is.
    You might tinker a bit using Kaleidoscope - it offers lots of interesting ways to customize Finder's display of things, and may include the ability to alter that.
    Kaleidoscope
    However, the filename background color is a global setting. Since the vast majority of filenames are presented (displayed) from within an enclosing folder, changing the filename background color to something other than the default will cause it to stand out against the folder's white background, instead of vanishing.

  • I have a iPad mini, I recently acquired a $15 iTunes card to get apps and music. I have forgotten my security questions and I cannot buy anything HELP (I tried to reset them in the Password and Security tab but the text under the questions does not show)

    I recently acquired a $15 iTunes card to get apps and music. I have forgotten my security questions and I cannot buy anything HELP (I tried to reset them in the Password and Security tab but the text under the questions does not show)

    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699?viewlocale=en_US&locale=en_US
    Try the link above. Try to find a phone number for your country, call and ask for account security.

  • Icon Text Color

    So I've seen discussions about being able to change icon text color and people have submitted suggestions to Apple about it.
    Still nothing has been done.
    Finder allows you to change the background finder window to whatever color you want but if you want black then you're out of luck because now you can't read the icons' text.
    I think it's ridiculous that this hasn't been fixed yet. It's such a simple thing that should have been fixed so long ago.
    Is there a reason for this?

    Hi,
    And please also check your "Show my desktop background on Start" option under Taskbar\Properties\Navigation, some users found that if we select "show my desktop background on Start", Win 8.1 ignores the drop shadow instruction.
    And the settings for Visual Effects under control panel and registry you mentioned above are the right location we should check, so if all of them are not working, I suggest you return your PC to a previous state at which the pc was functioning fine with
    restore point if possible.
    Yolanda Zhu
    TechNet Community Support

  • There were no results for device screen view no longer in RGB, everything looks reversed, or posterized, including icons, text

    Devise screen view no longer in RGB, everything looks reversed, or posterized, including icons, text?

    -App Store > New plus buttons next to some apps you wish to purchase. (Could someone please tell me what these mean?) You can also gift apps. >>>>>>>>>>>>> I suspect that means universal app for iPhone and/or iPad.

  • Help! Mail menus and icon text are all showing in Chinese/Asian characters!

    I am helping someone with their iMac G5 computer. A couple of days ago, all of a sudden the Mail program (v. 2.13) has all the menus, icon text, and mail folder descriptions (Inbox, Trash, Drafts, Sent, etc.) all showing in what looks to be Chinese (or other oriental language). I checked in System Prefs and language still set to US. None of the other program menus or text seem to be effected--just Mail. Anyone know what caused this or how to fix?? Thanks!

    Thanks for your reply. I am looking at the links you posted, but the problem here seems different. If you go into Mail, in the menu at the top, the word Mail is in English, then all of the other menu choices are written in what definitely appears to be an oriental language. If you click on a menu, all of the choices in the drop down menu are also oriental language. The e-mails themselves are in English, however the date of the e-mail is showing in oriental. On the left side, the words Inbox, Trash, etc. are all written in oriental as are the words under the icons. And, it's only in Mail. It just started doing this yesterday and the computer owner doesn't know why.
    Thanks so much for any further ideas/suggestions. I am going back to read more in the links you sent, but this seems a different problem.

  • Gnome 3.2 desktop icons text color

    I am running Gnome 3.2 with Gnome-Shell - but I have "Have file manager handle desktop" enabled.  The text under the icons on the desktop is Black.
    Does anyone know where that info is stored and/or how to change the color to white?
    Thanks.
    --Theoden

    wilson wrote:I had to remove .config/dconf/user twice to get rid of the black text. The first time, after reststarting with Alt-F2 'r', the desktop was mostly reset, but the icons were all still there, and running gnome-tweak-tool "Have file manager manage the desktop" was set to False, and setting it to True did nothing. I removed the file again, logged out, then logged in, and then the icon's were gone, and setting "Have file manager manage the desktop" properly put white text under the icons.
    Very interesting.  I did all that you suggested - and in the end - the icon text was still black.  However - I got to playing around and discovered the source of the problem.
    It is the GTK+ Theme.  If it is set to any GTK+ theme other than the default 'Adwaita' - the icon text is always black.  However, it works correctly - white - with Adwaita.
    So - I surmise that something changed in how Gnome 3.2 uses GTK+ - or something in GTK+ itself.  Perhaps Wonder may have some perspective on this ... I hope. 
    --Theoden

  • How to get text to align to the very top of a DIV?

    How to get text to align to the very top of a DIV?
    There is a gap at the top. I am using in this example H1 and
    a paragraph tag.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Text Alignment</title>
    <style type="text/css">
    body {
    background-color: #4a7186;
    p {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 2em;
    margin: 0px;
    padding: 0px;
    h1 {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 3em;
    margin: 0px;
    padding: 0px;
    #box1 {
    width: 450px;
    background-color: #FFFFFF;
    margin-right: auto;
    margin-left: auto;
    margin-top: 30px;
    padding: 0px;
    margin-bottom: 0px;
    #box2 {
    width: 300px;
    background-color: #FFFFFF;
    margin-right: auto;
    margin-left: auto;
    margin-top: 30px;
    padding: 0px;
    margin-bottom: 0px;
    </style>
    </head>
    <body>
    <div id="box1">
    <h1>Lorem ipsum H1</h1>
    </div>
    <div id="box2">
    <p>Lorem ipsum P</p>
    </div>
    </body>
    </html>

    <h1 style="margin-top:0;">Lorem ipsum H1</h1>
    It's a margin issue in SOME browsers.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "davidhelp" <[email protected]> wrote in
    message
    news:gpbg8q$8c6$[email protected]..
    > How to get text to align to the very top of a DIV?
    > There is a gap at the top. I am using in this example H1
    and a paragraph
    > tag.
    >
    >
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    > <title>Text Alignment</title>
    > <style type="text/css">
    > body {
    > background-color: #4a7186;
    > }
    > p {
    > font-family: Georgia, "Times New Roman", Times, serif;
    > font-size: 2em;
    > margin: 0px;
    > padding: 0px;
    > }
    >
    >
    >
    > h1 {
    > font-family: Georgia, "Times New Roman", Times, serif;
    > font-size: 3em;
    > margin: 0px;
    > padding: 0px;
    > }
    >
    > #box1 {
    > width: 450px;
    > background-color: #FFFFFF;
    > margin-right: auto;
    > margin-left: auto;
    > margin-top: 30px;
    > padding: 0px;
    > margin-bottom: 0px;
    > }
    >
    > #box2 {
    > width: 300px;
    > background-color: #FFFFFF;
    > margin-right: auto;
    > margin-left: auto;
    > margin-top: 30px;
    > padding: 0px;
    > margin-bottom: 0px;
    > }
    > </style>
    > </head>
    >
    > <body>
    >
    > <div id="box1">
    > <h1>Lorem ipsum H1</h1>
    > </div>
    >
    > <div id="box2">
    > <p>Lorem ipsum P</p>
    > </div>
    >
    > </body>
    > </html>
    >
    >

  • Hiding dock icon text?

    After a short while a Mac user soon knows what each icon on their dock represents and the popup text only serves a purpose to those not familiar with the Mac owners dock. With this in mind, the dock and overall look of the desktop is cleaner if the icon text is removed. Does anyone know a way to do this?
    Thank you.

    There must be a way, perhaps using a command via Terminal, it's a small change and should be easy for a developer, if it's possible. I've searched and searched online but found nothing.

Maybe you are looking for

  • How to delete duplicate photos in camera roll?

    I have pictures on my computer (not a Mac) I want to transfer onto my iPhone 5 but I already have some of them on my phone.  There are almost 2000 pictures and I don't want to go through each one individually to delete them.  Is there any app or easi

  • Dynamic configuration for the remoteworkflowclient not wf_client_Config.xml

    I need to connect to multiple servers(hosting the bpel workflow) based on input of the IP address of the server at runtime. I cannot modify the wf_client_config.xml at runtime as it will be within the client jar. Is there any other mechanism of conne

  • External Monitor Problem

    I've got a 24" Imac and just bought a Lindy Mini DVI>HDMI connector so I can watch DVD's via my LCD panel on the wall. I connect up, go to displays but the external screen is not found. (detect displays) Am I missing something with these imac DVI con

  • Email Spools and than Kicks me out when delete or email turn off attempt.

    After attempting to create an exchange account, my iphone is giving me trouble. I want to delete the account, but it will spool or cycle if I try to turn off the email, fade to black, and then return me to the home page. I have tried different modes

  • Not downloading Artwork and Effects panel

    I am using Photoshop Elements 5.0. around 1.5 year, and met the problem for the first time. Artwork and Effects panel doesn't have drop out window so I can't choose any effect to use it. The same with Create panel - it doesn't have any patterns for c