How can  i make icon a button

i only know of label
Icon icon = new ImageIcon("yobadic1.gif");
JLabel  lebel = new JLabel(icon);

hakimade wrote:
i only know of label
Icon icon = new ImageIcon("yobadic1.gif");
JLabel  lebel = new JLabel(icon);
I'm going to go out on a limb here and say that you didn't read the javadocs for JButton. So, here is the link...

Similar Messages

  • How can we make the save button active in standard toolbar in outout of alv

    Hi experts ,
    I am using factory method to print alv with oops .
    Cancel , Exit and Back button are active by default in Standard tool bar  in output of Report , But Save button is not active , How can i make that save button active .
    Also Pls tell me how i can make editable to the cell in output , 
    My Code is like this :
    cl_salv_table=>factory( IMPORTING r_salv_table = gr_table CHANGING t_table = ispfli ).
      gr_functions = gr_table->get_functions( ).
      gr_functions->set_all( abap_true ).
      gr_display = gr_table->get_display_settings( ).
      gr_display->set_striped_pattern( cl_salv_display_settings=>true ).
      gr_display->set_list_header( 'This is the heading' ).
      gr_columns = gr_table->get_columns( ).
      gr_column ?= gr_columns->get_column( 'CITYTO' ).
      gr_column->set_long_text( 'This is long text' ).
      gr_column->set_medium_text( 'This is med text' ).
      gr_column->set_short_text( 'This is sh' ).
      gr_column ?= gr_columns->get_column( 'CITYFROM' ).
      color-col = '6'.
      color-int = '1'.
      color-inv = '0'.
      gr_column->set_color( color ).
      gr_sorts = gr_table->get_sorts( ).
    *gr_sorts->add_sort( 'CITYTO' ).
      gr_sorts->add_sort( columnname = 'CITYTO' subtotal = abap_true ).
      gr_agg = gr_table->get_aggregations( ).
      gr_agg->add_aggregation( 'DISTANCE' ).
      gr_filter = gr_table->get_filters( ).
      gr_filter->add_filter( columnname = 'CARRID' low = 'DL' ).
      gr_layout = gr_table->get_layout( ).
      gr_layout->set_key( key ).
      key-report = sy-repid.
      gr_layout->set_save_restriction( cl_salv_layout=>restrict_none ).
      gr_table->display( ).
    Rgds,
    Premraj

    Hi,
    1)you need to give the function code to that save in the Function Keys of that screen from the GUI Status.
    2) while filling the field catalog of that field you need to put the        
    wa_fieldcat_edit-edit = c_x.
    i.e use the edit and append to that field catalog internal table.
    for more infomation you can refer to below links:
    problem with alv edit and save
    *Edit* and *Save*  for the selected records in ALV
    solves your problem
    Thanks!!

  • How can I make a giff button have a second state?

    how can I make a giff button have a second state?

    how can I make a giff button have a second state?

  • How can I make the playback buttons of YouTube and other plug-ins bigger since they are so tiny?

    How can I make the playback buttons of YouTube and other plug-ins bigger since they are so tiny in Firefox? I tried some suggestions that dealt with entering "about:config" in a fresh browser, but to no avail. I also downloaded an add-on called "Theme Font & Size Changer", but that didn't work either. So, I am reaching out here as that was a suggestion that another user here offered.

    Ah, yes- that is an ultra high DPI (dots per inch) display. This is a known issue in Flash Player, which Adobe is working on fixing.
    In the mean time, you can get some videos to have normal-sized controls by switching Youtube to the HTML5 video player:
    In Firefox, go to https://www.youtube.com/html5 and click the "Request the HTML5 player" button.

  • How can I make the "Music" button on the iPhone say something other than "Music" for it's label?

    Hi,
    The question is in the post title. I would like to change the icon which says "MUSIC" on the iPhone (formerly used to say "iPod" in the older O.S.'s) to something else. Let's say I want it to say "Audio" instead. Basically, in yet other words, I want to remane this icon to something else.
    Is this possible to do? If so, how can I go about it?
    Thank you in advance for your help.

    You can't.

  • How can I make the FN buttons work with an older notebook?

    Hi,
    I have the Satellite 5200-902 notebook. Unfortunately there is no support for such an "old" notebook like this concerning Windows Vista. Vista runs great on it but the only thing I didn´t make is to make to FN buttons work in Vista.
    Can someone please give me an advice ?
    Thanks

    Hello Danny
    Unfortunately I do not believe you will have success with those buttons. The fact is that Toshiba use self designed utility for functionality of all FN buttons. As you know, old notebook models are not vista supported and you will not be able to find and install any utility for that.
    Sorry but there is nothing to do.

  • How can I make icons appear while thunderbird is open?

    While I have Thunderbird open I normally can see my icons at the bottom of the screen (file manager, firefox, etc) but now they do not appear and I have to quit Thunderbird when I want to go to a different program.

    It sounds like you have 'full screen' mode which I thought was not available...mmmmm!
    Check your ~Tools > add-ons
    How many 'themes' do you have listed?
    Is there only one called default and it is selected?
    If you have more than one, select/enable 'default' and delete/remove all other themes.
    Close and restart Thunderbird.
    What OS are you using?

  • How can I make the Homepage Button automatically lauch the Homepage in a new tab?

    I have Firefox 22.0 installed, I recently did a reset and now have lost the ability I had to click on the homepage button and automatically launch the Homepage in a new tab? I like this option since when I click on my homepage it doesn't override my current page. I know you can configure new tabs to open the homepage automatically ; and that you can use the Ctr+Homepage Button to open the home page in a new tab. However I would like to know what setting I can add/change to restore this missing feature.
    Thanks

    Open a new tab. In the address bar type; '''''About:Config''''' and press
    enter. If you get a page that warns you about continuing, press the
    '''''I will be careful''''' button. In the search bar, type; '''''Newtab'''''.
    Look for; '''''Browser.newtab.url'''''. Right click and select '''''Modify'''''.
    Type; '''''About:home''''' (or what ever page you want) and press
    enter. That should do it.
    .

  • How can I make the volume buttons on my iPod Touch control ALL sounds - not just alerts and system sounds?

    I would like to TOTALLY silence my iPod.  I turn the volume all the way down using the buttons on the side, but this just silences alerts and system sound effects.  Then I start a game, and the game sounds still play.  Of course I can turn the volume down after the game starts, but by then I'm already busted :-)
    I don't know if it's related, but...
    I can plug in my headphones and then turn the game volume all the way down. But when I remove the headphones, the volume goes back up again.

    First
    Forgotten Security Questions/Answers
    You need to contact Apple by:
    1 - Use the Express lane and start here:
    https://expresslane.apple.com
    then click More Products and Services>Apple ID>Other Apple ID Topics>Forgotten Apple ID security questions.
    or
    Apple - Support -form iTunes Store - Contact Us
    2 - Call Apple in your country by getting the number from here:
    http://support.apple.com/kb/HE57
    or           
    Apple ID: Contacting Apple for help with Apple ID account security
    3 - Use your rescue email address if you set one up
    Rescue email address and how to reset Apple ID security questions
    For general  information see:
    Apple ID: All about Apple ID security questions
    Then edit your account to add a valid email address
    How do I change my Apple ID Name or personal information?
    You can change your Apple ID Name at My Apple ID. Click on Manage your Apple ID and sign in with your Apple ID name and password. Click Edit and enter the new information, then click Save Changes. Changes take effect immediately. You can also use My Apple ID to change your personal information, such as your mailing address or email address. See Changing the name you use for your Apple ID if you'd like more information.

  • How can I make the headphone button pause/resume the right thing on my MacBook?

    On my iPhone, I've developed the habit of using the headphone button to pause/resume/skip what I'm listening to.
    But on my Mac, I try to do the same and instead it ends up launching iTunes, which I do not generally use for listening to music.
    For example, here is a page with a simple audio player
    http://jsfiddle.net/g69x2rt6/embedded/result/
    I start playing the music, then I press the headphone button.  Instead of pausing the playing music, as I expect, iTunes opens.
    The linked page works fine on my iPhone, with the same headphones.
    How do I get the proper behavior back?

    Do a hard restart:   
    hold the power button and the home button down together until the device shows the apple symbol again (hold it past the actual red slider and black screen).   When you see the Apple symbol come up, release both buttons
    then try to reset if that does not work
    Settings>General>Reset>Reset all

  • How can I make the standby button also change ringer profile?

    I do not use a holster but would like the standby mode (pressing mute) to use the holster profile settings.  Or if this is not possible is there any way to make it automatically change ringer profiles when placed in standby?  I would like to change to vibrate when in standby mode as the phone will be in my pocket.

    Standby option is capable of doing so. That wish can be materialized only if you use holster.
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • HT2477 how can i make icons out of my bookmarks

    icons out of bookmarks?

    I am not sure what you mean.
    You want your bookmarks on your desktop as icons?
    Click the bookmark > Drag the icon on the left of the address bar to your Desktop (or where ever you want it)

  • How can i make save button of a pop up window inactive?

    Hi...
    When we open a document attached to an opportunity,
    a pop up opens up in new window with open,save and cancel buttons.
    The document is opened by creating a url....
    How can i make the save button inactive?
    Any helpful pointers would be rewarded...
    Thanks...

    Hi..
    This thread remains closed...

  • How can I use the find button in Edit ADF Table in JDeveloper 10.1.3

    Hi all,
    in JDeveloper 10.1.3
    How can I make the find button work in
    the same Edit ADF Table without adding new view ?
    thanks

    Hi there,
    it depends on what you mean by adding a new view object. You[b] don't have to create a new viewobject. You do have to add a second instance of your existing view object to your page.
    Form scratch works more or less like this. Drop your view object as ADF table on the form. Add the find and execute operations. Drop the same view object on your form but now as ADF search form. Place the fields form the search form in the corresponding columns next to the existing fields. For each #{row} field ,and the find button, set the rendered property
    #{bindings.testUserIterator.findMode ==false}. For each inputfield, and the execute, set the rendered property #{bindings.testUserIterator.findMode ==true}.
    Now it will work.
    I hope this is what you are looking for.
    Good luck
    Luc Bors

  • I down loaded sygic on my iPhone 3s but the icon is missing even in the search but when I want to download it again ,it say this application is present, how can I make the icon to show up

    I down loaded sygic on my iPhone 3s but the icon is missing even in the search but when I want to download it again ,it say this application is present, how can I make the icon to show up

    - Have you tried a reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Try syncing  the iPod to your computer. Then delete from iTunes and sync. that should delete it from the iPod. Then redownload it.

Maybe you are looking for