JMenu with text and icon

Is it possible to create a JMenu with text and an icon where only the icon brings up the menu and the text behaves like a JMenuItem? How would you do this. Right now I have a JMenuItem next to a JMenu where the JMenu only has an icon. The problem with this is it is seemingly impossible to get them as close together as I would like. Any suggestions for solving the spacing issue would be equally helpfull. Thanks.

From your previous thread you are aware that JMenu and JMenuItem both extend AbstractButton. So, you should be able to play with the borders and margins:
setBorder(null);
setMargin( new Insets(0, 0, 0, 0) );

Similar Messages

  • Photoshop CC 2014 UI Menu Text And Icon Size?

    so i really like that adobe has added the "experimental" option to increase the ui menu text and icon size in photoshop cc 2014, it was almost unreadable on my 2560 x 1440 27" monitor with photoshop cs4 and illustrator cs4, but the lone 200% setting is too big... seems that 125%, 150%, or maybe even 175% would be much better solutions. in fact, for reasons i can't quite understand, the ui text and icon size in illustrator cc 2014 is spot on, absolutely perfect on my monitor, even tho there is no option for increased ui size as far as i can tell, it was spot on the moment i installed and launched it.
    in short, the photoshop cs4 and illustrator cs4 user interfaces were identical in size as far as i could tell, and far too small on my 2560 x 1440 27" monitor. in terms of cc 2014, the illustrator ui is perfect out of the box on my monitor, considerably larger than illustrator cs4, while the photoshop cc 2014 ui is identical to cs4, tiny, but can be enlarged 200% which makes the ui too big. why couldn't/didn't adobe just make the photoshop cc 2014 base ui the exact same size as the illustrator cc 2014 ui? it would have been perfect (for my monitor size).

    thanks... just wish illustrator cc 2014 wasn't so perfect in terms of ui size, i mean it's just great and, consequently, makes it seem as if the ball was dropped with photoshop cc 2014... i mean how can one be spot on while the other be so far off?

  • Windows updates gave me version of Firefox that does not allow me to have Text and Icon in Menu Bar, lost my autofill; how do I get old version back?

    Windows updates this morning gave me a different firefox: the Customize box includes fewer choices. No Text and Icon, which I want. Also, this new version dropped my Autofill.

    It wasn't Windows update that caused this, but Firefox automatic updates. It's the new Firefox 29 Australis, their attempt to look more like Chrome. They dramatically changed the UI, removing several features in the process. If the way it looks bothers you as much as it does others you can install Firefox 28 again by going here;
    https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/en-US/
    That of course does come with the risk of security exploits they fixed with 29, so beware of that. I also don't know if it will repair your auto fill or anything.
    Otherwise if you don't mind the new look, keep using it.

  • My hard drive died last week, and I needed to install a new one.  Previously, I was able to save a .doc with text and inserted photo to .pdf and then to .jpg.  Now I can get the .pdf but can't determine what to do to convert to .jpg.  Does anyone know ?

    My hard drive died last week, and I needed to install a new one.  Previously, I was able to save a .doc with text and inserted photo to .pdf and then to .jpg.  Now I can get the .pdf but can't determine what to do to convert to .jpg.  Does anyone know ?

    Rather than do that, which means starting over from scratch, losing all your edits, organisation and so on, why not simply use iPhoto Library Manager to revert the Library to the older version? Easier, less destructive.
    The instructions on that are here
    If you really want to start over: you can access the Originals folder simply by going to your Pictures Folder and finding the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.

  • How do i set text in a object so that object expands with text and has even space on both sides of the object in illustrator cc?

    how do i set text in a object so that object expands with text and has even space on both sides of the object in illustrator cc?

    if you see all the different panel. I past the info in and have to manually expand the width of every panel. Is there a way of pasting the text in and the panel moves to the right with so that there is an even space on both sides of the blue panel?

  • I´ve made four Columns with text and an Image over the middle of two columns. How do I put a text u

    I´ve made four Columns with text and an Image over the middle of two columns. How do I put a text under the Image that spans over the Columns?

    Did you mean that?
    or
    Did you mean that?
    Let me know.

  • How do you share thousands of pictures with text and captions outside of PSE?  (PSE 4)

    One of my dad’s retirement passions is family genealogy and old family pictures.  Several years ago I gave my family PSE 4.0 for Christmas so that we could each have backup copies of our dad’s pictures.  Usually once per year, I made backup copies of everything and emailed the DVDs to my brothers and sisters.  Everyone knows the basic PSE 4 functions and share our dad's enjoyment with the old family photos.
    My problem is that my dad is running out of pictures to scan.  He wants to “share” or “show” his photos with others so that he can “borrow” their photo albums in order to scan their photos.  He plans to attend a hometown high school reunion later this fall.  He hopes to "collect" photo albums from cousins and classmates.  I have been struggling with this for several days without any good ideas.
    The scanned pictures lack any text (added as a layer?) or captions.  Creating a slideshow (on my dad’s computer is slow).  Also, a slideshow doesn’t let others select individual pictures to save from the slide show
    He has old pictures pre-PSE 4 that allowed him to add captions directly to the picture when it was scanned.  I never liked this approach as it "destroyed" the actual picture but these old pictures are more easily shared as individual pictures.
    How do you share thousands of pictures with text and captions outside of PSE?  Can you save or export a composite picture with all the layers?
    Thanks in advance for your help and replies.

    I think it is one of the printer option screens that gives me the choice of tabbed 4x6. All of the choices specifiy HP or Other so I am pretty sure it is printer software that offers me this choice.
    Make sure your image has a 4x6 aspect ratio. I have been quite happy with the tabbed 4x6. Just need to remember to load the paper with the tab last.
    So, in elements you set to 4x6, in printer options you should be able to choose 4x6 tabbed paper.

  • TS2755 Does anyone know why: when using Messages on my iPad, a cannot send a message with only text on it? Strange though, I can send a message with text AND a photo??

    Does anyone know why, when using Messages on my iPad, a cannot send a message with only text on it? Strange though, I can send a message with text AND a photo??

    Hi Cass,
    If you are having issues with Messages on your iPad, you may find the following article helpful:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Regards,
    - Brenden

  • BasicArrowButton with text and/or icon

    Hi, I have to display a button that has the arrow from BasicArrowButton but also display text and/or icon. I made a JPanel that has a JButton and a BasicArrowButton and everything looks fine except that the border I see covers only the JButton... I know I can just call setBorder to the panel but it has to be the same border from a regular JButton and be look and feel compatible. I tried this line:
    panel.setBorder(button.getBorder());
    But I get a ClassCastException. The only thing I can think of is to override the paint method from the JButton, but I don't really know how to do this...
    Thanks for the help

    From your previous thread you are aware that JMenu and JMenuItem both extend AbstractButton. So, you should be able to play with the borders and margins:
    setBorder(null);
    setMargin( new Insets(0, 0, 0, 0) );

  • Make the purple box around text and icon of a button go away?

    I have noticed that the first button of a group (or the last one pressed) displays a purple box around the text and/or the icon of a button. I don't want this. How do I get rid of it?

    Have you tried setting the colour that you want manually? Or perhaps setting the setOpaque() method with false?
    Not entirely sure what you mean...what look and feel are you using? Is it the Metal LAF or something else?

  • How can i copy line with text and image to ms word

    When I insert an image in textflow using InlineGraphicElement it works, but when I copy the line with the image to MS Word it copies only the text (not the image).
    How can i copy the image to MS Word?

    If you want copy formatted text and image to MS Word, you need to give MS Word rtf markup, because Word can recognize rtf markup but not TLF markup.
    So you need to create a custom clipboard to paste a rtf markup. It's a large feature for you, because you need a tlf-rtf converter in your custom clipboard.
    TLF Custom Clipboard Example:
    package
        import flash.display.Sprite;
        import flash.desktop.ClipboardFormats;
        import flashx.textLayout.container.ContainerController;
        import flashx.textLayout.conversion.ITextImporter;
        import flashx.textLayout.conversion.TextConverter;
        import flashx.textLayout.edit.EditManager;
        import flashx.textLayout.elements.*;
        import flashx.undo.UndoManager;
        // Example code to install a custom clipboard format. This one installs at the front of the list (overriding all later formats)
        // and adds a handler for plain text that strips out all consonants (everything except aeiou).
        public class CustomClipboardFormat extends Sprite
            public function CustomClipboardFormat()
                var textFlow:TextFlow = setup();
                TextConverter.addFormatAt(0, "vowelsOnly_extraList", VowelsOnlyImporter, AdditionalListExporter, "air:text" /* it's a converter for cliboard */);
            private const markup:String = '<TextFlow whiteSpaceCollapse="preserve" version="2.0.0" xmlns="http://ns.adobe.com/textLayout/2008"><p><span color=\"0x00ff00\">Anything you paste will have all consonants removed.</span></p></TextFlow>';
            private function setup():TextFlow
                var importer:ITextImporter = TextConverter.getImporter(TextConverter.TEXT_LAYOUT_FORMAT);
                var textFlow:TextFlow = importer.importToFlow(markup);
                textFlow.flowComposer.addController(new ContainerController(this,500,200));
                textFlow.interactionManager = new EditManager(new UndoManager());
                textFlow.flowComposer.updateAllControllers();
                return textFlow;
    import flashx.textLayout.conversion.ITextExporter;
    import flashx.textLayout.conversion.ConverterBase;
    import flashx.textLayout.conversion.ITextImporter;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.elements.IConfiguration;
    import flashx.textLayout.elements.TextFlow;
    class VowelsOnlyImporter extends ConverterBase implements ITextImporter
        protected var _config:IConfiguration = null;
        /** Constructor */
        public function VowelsOnlyImporter()
            super();
        public function importToFlow(source:Object):TextFlow
            if (source is String)
                var firstChar:String = (source as String).charAt(0);
                firstChar = firstChar.toLowerCase();
                // This filter only applies if the first character is a vowel
                if (firstChar == 'a' || firstChar == 'i' || firstChar == 'e' || firstChar == 'o' || firstChar == 'u')
                    var pattern:RegExp = /([b-df-hj-np-tv-z])*/g;
                    source = source.replace(pattern, "");
                    var importer:ITextImporter = TextConverter.getImporter(TextConverter.PLAIN_TEXT_FORMAT);
                    importer.useClipboardAnnotations = this.useClipboardAnnotations;
                    importer.configuration = _config;
                    return importer.importToFlow(source);
            return null;
        public function get configuration():IConfiguration
            return _config;
        public function set configuration(value:IConfiguration):void
            _config = value;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.ListElement;
    import flashx.textLayout.elements.ListItemElement;
    class AdditionalListExporter extends ConverterBase implements ITextExporter
        /** Constructor */
        public function AdditionalListExporter()   
            super();
        public function export(source:TextFlow, conversionType:String):Object
            if (source is TextFlow)
                source.getChildAt(source.numChildren - 1).setStyle(MERGE_TO_NEXT_ON_PASTE, false);
                var list:ListElement = new ListElement();
                var item1:ListItemElement = new ListItemElement();
                var item2:ListItemElement = new ListItemElement();
                var para1:ParagraphElement = new ParagraphElement();
                var para2:ParagraphElement = new ParagraphElement();
                var span1:SpanElement = new SpanElement();
                span1.text = "ab";
                var span2:SpanElement = new SpanElement();
                span2.text = "cd";
                list.addChild(item1);
                list.addChild(item2);
                item1.addChild(para1);
                para1.addChild(span1);
                item2.addChild(para2);
                para2.addChild(span2);
                source.addChild(list);
                var exporter:ITextExporter = TextConverter.getExporter(TextConverter.TEXT_LAYOUT_FORMAT);
                exporter.useClipboardAnnotations = this.useClipboardAnnotations;
                return exporter.export(source, conversionType);   
            return null;

  • Boot camp problem with desktop and icons

    I had installed windows 7 on my mac (2012 os x lion 10.8.2) with boot camp but when i switch on windows 7 first i see windows 7 icon and when windows xp desktop with windows 7 icons. Sounds sometimes are from windows 7 and sometimes from windows xp. I had installed all drivers boot camp had downloaded but everything is steel looks like a windows xp. What shold i do?

    The language of my Keyboard is French

  • I ... Acrobat.... (sometimes, when I need to print PDF with text and image)

    First of all, I want to let Adobe know that you are a immens castle that is almost impossible to communicate with!
    I just want a simple question to be answered: I want to print a document which beholds text AND an image.
    If I print it, the image is NOT on the print (MacBook and iMac Yosemite)
    If I print it form my iPhone (6), the image is on the print.
    How can I fix it?

    You report your problem as using Acrobat on a Mac. You've posted in the Reader forum for iOS.
    I've moved your question to the Creating, Editing and Exporting PDF forum which seems more appropriate.
    You'll need to provide more information for us to be able to help you.

  • Will Adobe ExportPDF convert a pdf with text and images to docx ?

    I have tried to convert an adobe pdf, which includes text and images, to a docx file.  The Adobe ExportPDF has not been able to do it - comes back with many errors.

    Mostly it can do it, though you can't expect a precise match on the layout. What errors do you get?

  • Preview will not let me annotate document with text and save - HELP!

    I have to provide a JPG document to a client that they need to annotate with text in Preview. However, Preview will not allow either of us to save this document once it is annotated, even though I created the JPG through an exported Illustrator File (and therefore have rights to the document).
    I have talked to many other people that have annotated documents with text in Preview & save the document without problems, so I have not been able to receive any helpful information to correct this issue.
    ... Or are there any other suggestions of programs that my client can open the JPG in and annotate with text? She also has a MacBook Pro and would be willing to download a program if it was reasonably priced/free.
    Please help!

    Have you turned on MMS messaging in Settings?

Maybe you are looking for

  • How can I get sound from tv or stereo when watching netflix on MacBook Air?

    I have my macbook air hooked up to my tv and want to watch netflix but the only sound is from my macbook.  How can I get sound from other sources ie tv or stereo?

  • Problem with iPod output preset

    I am trying to output a video for my client's iPod.  This is the first time that I've been requested to do this.  I have tried using both the large video and small video H.264 iPod presets.  Each time, the resulting video is jittery.  I had no troubl

  • To read Double Byte Character

    Hello All, What is meant by Double Byte Character. I want to read the this Double Byte Character.Is there any function module or class to read this or any other way to get the double byte character. This is very urgent please i will reward points. Th

  • ObjectNotExistsException with Adobe Form

    I'm trying to display a simple Adobe Form from a Web Dynpro component but nothing loads on the screen.  I know that the landscape is configured correctly as another project using an Adobe form is working correctly, so it must be something in my proje

  • Trying to install Illustrator CS4 onto my new PC. Does not recognize serial number.

    Got a new PC last week.  Trying to reinstall Adobe Illustrator CS4. Put in disc... typed in the serial number as requested, but it is not recognized.  Would appreciate any help. Thanks.