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) );

Similar Messages

  • 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) );

  • 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

  • Can I enlarge the text and/or icons in Photoshop CS5 or Bridge CS5?

    My sight is poo rand I'd like to make the text and icons larger in Photoshop and Bridge CS5.  Can it be done?  I have a 27" monitor. 

    That is a problem then.  I can adjust my text sizes in the palette titles, menus, title bars etc. in windows and it has had the desired effect in CS and CC.  There is a problem with the text size in CC 2014 however that many are experiencing including myself.  I still use CC most of the time because of the bug.  Although I'm running 8.1, adjusting the text size in 8.0 and 7 worked just the same with renditions of Photoshop prior to 2014.
    Good luck.
    Jim

  • Button with text UNDER the icon

    Ho,
    I want to create a square button, where the text is UNDER the icon.
    Is there an easy way to do this, or do I need to write my own component?
    Cheers
    Jens

    Hi,
    Use ID in your button. Suppose i have used buttonId then my CSS will look like this.
    <style type="text/css">
    #buttonId-img.sapUiIcon {
    text-align: center;
    display: block;
    vertical-align: top;
    line-height: 100%;
    #buttonId.sapMBtn  {
    height: 5.0rem;
    min-width: 5.0rem;
    margin: 0;
    padding: 0;
    vertical-align: top;
    background-color: #f7f7f7;
    border: 1px solid #bfbfbf;
    color: #333333;
    text-shadow: 0 1px 0 #ffffff;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 0.875rem;
    .sapMBtnContent>.sapUiIcon {
    color: #666666;
    font-size: 1.375rem;
    line-height: 2.875rem;
    width: 2.875rem;
    text-align: center;
    margin: auto;
    </style>
    This is screenshot.
    Id of first button id buttonId and for second is button1Id.
    This is view code now.
           createContent : function(oController) {
                  jQuery.sap.require("sap.ui.core.IconPool");
                  var oButton = new sap.m.Button("buttonId",{
                         text: "Press Me",
                         icon: sap.ui.core.IconPool.getIconURI("customer"),
                  var oButton1 = new sap.m.Button("button1Id",{
                         text: "Press Me",
                         icon: sap.ui.core.IconPool.getIconURI("customer"),
                  return new sap.m.Page({
                         title: "Title",
                         content: [
                                   oButton, oButton1
    Go through 3rd method of this document for doing experiments with your CSS. Implementing CSS in SAPUI5 Application
    Regards
    Dhananjay

  • 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;

  • 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.

  • Windows 7 with CS4 and PSD Icons

    Hi,
    I have Windows 7 64bit, Photoshop CS4 and Photoshop 7 (for back-up).
    I know that Photoshop 7 allowed thumbnail previews on PSD's but that was taken out so CS4 is just a custom icon, but Windows 7 doesn't seem to really get what to do with either of them, and you can't force a certian icon on a certian file type like you could in XP because Microsoft basically got rid of the ability to do so now.
    The attatched image shows two PSD's in the same folder, one with a defaul windows "unknown" file icon, but with photoshops logo on it to represent what it will open it with anyway, and the other has a preivew although it has never been opened in PS7 (both fully created in CS4, nothing else). For the sake of organisation, is there a way to either get them all to be previews of thumbnails or all one generic icon (preferably not the one it has made it from windows).
    Thanks,
    Ricky

    Hi Ricky
    In Windows Explorer (Windows 7) if you right click on a file icon a menu pops up offering your the choice under Open with->Choose Default Program. If you select Photoshop it will change the icon to the Photoshop and open the file.
    I notice that the file extension is not showing in your example I suggest you turn this feature on just to make sure both files are .psd.
    As to the thumbnails, I found Windows Explorer so inadequate, I bought a program call Directory Opus, I think you can get a free 30 day trial if you're interested at http://www.gpsoft.com.au/ it has many features left out of Windows Explorer including a really good thumbnail feature.
    Good luck with it.
    Mike

  • 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?

  • Slideshow with Text and Music

    I am not sure what program (if any) will do this. We need to make a presentation .... photos, with some text and music.
    I know you can do the slideshow in iphoto.....with music...but not sure about the text portion.
    Any advice or pointers would be GREAT!!!
    Thanks Laura

    Laura Drew1 wrote:
    .. Any advice or pointers would be GREAT!!!
    http://www.apple.com/ilife/tutorials/#imovie

Maybe you are looking for

  • Can't use preview to open pdf files

    In the last week Preview has stopped opening my PDF files, it's like the  pdf that comes via email has no link so I have to right click and use "open with" and can only open pdf files now using adobe reader.  I have not installed anything lately so n

  • Not opening Adobe when I print to it

    I print to adobe alot from excel and word...However, I do not want adobe to open when I do this.  I just want the document in pdf form so i can e-mail.  How can I tell adobe to not open when I print to it from another program. Thanks for any help.

  • My image is too large for the print service. Best options...

    I shoot with a Nikon D800. It appears the images are too large for the print service. What's the best method to reduce file size? Open in Photoshop, edit size, and return to Aperture?

  • Installing Symantec endpoint Protection installtion failed

    Hi ,  I have Symantec endpoint protection and have setup.exe. I have create a package and created a program as setup.exe /s /v"/qn RUNLIVEUPDATE=0 REBOOT=REALLYSUPPRESS" but unfortunately installation fails as part of Task sequence. just wondering if

  • Off off off topic!

    This is only indirectly an iMovie question. Last week I went to the Virtix plugin site recommended by Dan Slagle. Selected a couple of their plugins and went to purchase online but there's a message saying the online shop is closed for repairs. I've