Results 1 to 3 of 3

Thread: Java Action

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    Java Action

    Hello

    I started to play with and use the Java Action, which is supposeldy a nice way of sharing attributes between Buttons and Menus and the like, they take there text and images from the action, and the neat thing is you disable the action, and it disables the component that the action is sat in.

    Marvellous i thought.....

    except, and i might be missing something.. I add my action to a JMenuItem and a JButton

    the JButton is on a toolbar the menu ina menu, how do i supress the Text on the Jbutton and or toggle between no text showing and the action provided text showing? seems like a sebsible request i think?!

    Any ideas?


    Cheers in advance

    Andy

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    This is strange. I have an XML-based UI system which generates the actions, menu items and buttons for me. The buttons don't show the text, they just show the image.

    I use JToolBar.add(Action) though.
    Last edited by CornedBee; Feb 26th, 2004 at 06:26 PM.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    ah hah!

    in thats case its my fault!, i thought you had to make buttons and then add them to the toolbar, i never even considered adding the action to the toolbar instead!

    D'OH!!!!

    marvellous, thanks you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width