How to resize a button

How to se ta size of a button??
I tried to use
Button.setSize(int,int);but the buttons size remains the same, no errors though, but the size of the button is still the same
Help

No that's not really the point - thank you for the dike BTW ... rather it matters which one is used and how it is configured. I really suggest you read the tutorial - it is not very long. Next try coding by switching only the LayoutManager:
import java.awt.*;
public class MyFrame extends Frame {
  public MyFrame() {
    setLayout(new GridLayout(1,1,0,0));
//    setLayout(new BorderLayout());
//    setLayout(new FlowLayout(FlowLayout.CENTER));
    Button b = new Button("GO!");
    add(b);
    pack();
    setVisible(true);
  public static void main(String[] argv) {
    new MyFrame();
}

Similar Messages

  • How  to resize Matrix, button in form when  Form  Restore or Maximize

    Hi Expert,
               How to  to resize my form when Forms are maximize or Restore

    You may check through these:
    http://forums.sdn.sap.com/search.jspa?threadID=&q=%22resize+Matrix%22&objID=f56&dateRange=all&numResults=15

  • Question:   how to resize form buttons in a CSS

    I have a question.   I am trying to implement some PayPal features into my website with some their custom button functionality.   In normal HTML, the buttons look fine.  But using a CSS template, the form buttons get squashed and funny looking.   Is there an easy way to resize them?
    (I'm using Dreamweaver CS4 on a WinVista machine)  
    Any help is greatly appreciated. 
    -ryan

    and here is the ENTIRE CSS file
    CSS Credit: http://www.templatemo.com/
    body {
        margin:0;
        padding:0;
        line-height: 1.5em;
        font-family:  Helvetica, Arial, sans-serif;
        font-size: 11px;
        color: #FFFFFF;
        background: #FFFFFF;
    h1 {
        margin: 0 0 25px 0;
        padding: 10px 0 10px 15px;
        font-size: 20px;
        font-weight: bold;
        color: #ffc601;
        background: #000000;
        border-bottom: 1px solid #b4a08a;
    h2 {
        width: 235px;
        height: 25px;
        padding: 15px 0 0 35px;
        margin: 0 0 25px -10px;
        font-size: 16px;
        color: #6c5b4c;
        background: url(images/left_heading_background.gif) no-repeat;
    h3 {
        margin: 0 0 5px 0;
        padding: 0;
        font-weight: bold;
        font-size: 14px;
        color: #ffc601;   
    h4 {
        margin: 0 0 5px 0;
        padding: 0;
        font-weight: bold;
        font-size: 12px;
        color: #999999;
        text-align: center;
    .rantsection {
        height: 13px;
        margin-bottom: 10px;
    .rantsection img {
        float: left;
        height: 13px;
        width: 13px;
        border: 0px;
        margin-right: 5px;
    a:link, a:visited { color: #999999; text-decoration: none;}
    a:active, a:hover { color: #999999; text-decoration: underline;}
    .more_button a{
        clear: both;
        text-align: center;
        display: block;
        width: 60px;
        padding: 1px 0;
        margin-bottom: 5px;
        background: #6c5b4c;
        border-bottom: 1px solid #a59180;
        color: #FFFFFF;
        font-weight: bold;
        text-decoration: none;
    .download_button a{
        float: right;
        text-align: center;
        width: 65px;
        padding: 1px 0;
        background: #6c5b4c;
        border-bottom: 1px solid #a59180;
        color: #FFFFFF;
        font-weight: bold;
        text-decoration: none;
    img {
        border: 1px solid #6c5b4c;
    /* ----- Form ----- */
    .form_row{
        margin-bottom: 3px;
    form{
        margin: 0;
        padding: 0;
        text-align: right;   
    label {
        margin-right: 10px;
    input{
        width: 130px;
        height: 18px;
        padding: 1px 0;
        line-height: normal;
        color: #99836c;
        border: 1px solid #99836c;
        background: #400a0a;
        font-size: 14px;
    select{
        color: #99836c;
    .button{
        width: 60px;
        line-height: normal;
        margin: 0;
        height: 23px;
    /* End of Form */
    #container {
        margin: 0px auto;
        width: 970px;
        background: url(images/main_background.gif) repeat-y;
    /*------------ Header --------------- */
    #header {
        float: left;
        width: 900px;
        padding: 0 35px;
        margin: 15px 0 10px 0;
    #title {
        float: left;
        width: 300px;
    #sitetitle {
        padding: 30px 0 10px 0;
        font-size: 4.0em;
        font-weight: bold;
        color: #FF9933;
    #sitetitle span{
        font-weight: normal;
        color: #FFFFFF;
    #login {
        float: right;
        margin-top: 25px;
        width: 300px;
    /* -------------- End of Header------------------ */
    /* --------- Banner ---------- */
    #banner {
        clear: both;
        width: 970px;
        height: 256px;
        background: url(images/banner.jpg) no-repeat;
    #banner_text {
        padding: 60px 0 0 225px;
        width: 550px;
    #banner_title{
        margin: 0 0 25px 0;
        padding: 0;
        font-size: 24px;
        font-weight: bold;
        color: #ffc601;
    #banner_text p{
        margin: 0 0 25px 0;
        padding: 0;
    /* --------- End of Banner ---------- */
    /*--- Menu ---*/
    #menu{
        float: left;
        width: 970px;
        height: 51px;
        background: url(images/menu_background.gif) no-repeat;
    #menu ul {
        float: left;
        margin: 0;
        padding: 10px 0 0 40px;
        list-style: none;
    #menu ul li{
        display: inline;
    #menu ul li a{
        float: left;
        width: 140px;
        height: 20px;
        margin-top: 10px;
        padding: 0;
        font-size: 1.1em;
        font-weight: bold;
        text-align: center;
        text-decoration: none;
        color: #CCCCCC;
        border-right: 1px solid #CCCCCC;
    #menu ul li .lastmenu{
        border-right: none;
    #menu li a:hover, #menu li .current{
        color: #FFCC33;
    /*--- End of Menu ---*/
    /*--- Content ---*/
    #content {
        float: left;
        margin: 0;
        padding: 0 10px;
        width: 950px;
        color: #FC3;
        text-align: center;
    /*--- Left Column---*/
    #left_column {
        float: left;
        margin: 20px 10px 0 0;
        padding: 0px;
        width: 235px;
    .left_col_box {
        margin: 0 0 25px 25px;
        color: #AAA;   
    .blog_box {
        padding-bottom: 15px;
        margin-bottom: 15px;
        border-bottom: 1px solid #220404;
    .blog_box h3 a{
        font-size: 12px;
        color: #d3a401;   
    .blog_box span{
        color: #99836c;
    /*--- End of Left Column---*/
    /*--- Right Column---*/
    #right_column {
        float: right;
        margin: 25px 25px 0 0;
        padding: 0;
        width: 650px;
    .right_panel_fullwidth {
        float: left;
        width: 650px;
        padding: 0 0 25px 0;
    .right_panel_fullwidth img{
        float: left;
        margin: 3px 10px 0 0;
    .right_panel_fullwidth_content {
        float: left;
        width: 620px;
        padding: 0 15px 25px 15px;
    .right_panel_fullwidth_content p{
        text-align: justify;
    #new_released_section {
        float: left;
        width: 650px;
        margin: 0 0 30px 0;
    .new_released_box {
        float: left;
        width: 180px;
        margin: 0 10px 0 15px;
        text-align: center;
    .new_released_box img{
        margin-bottom: 5px;
    #news_section {
        float: left;
        width: 310px;
        margin: 0 25px 0 0;
    .news_box {
        float: left;
        width: 280px;
        margin: 0 15px 25px 15px;
    .news_box img{
        float: left;
        width: 110px;
        margin: 3px 10px 0 0;
        border: 1px solid #333333;
    .news_box p{
        margin: 0;
        padding: 0;
    #topdownload_section {
        float: right;
        width: 300px;
        padding: 0;
        margin: 0;
        background: #99836c;
    .topdownload_box {
        float: left;
        width: 270px;
        padding-bottom: 5px;
        margin: 0 15px 10px 15px;
        color: #24211d;
        font-weight: bold;
        border-bottom: 1px solid #6b5946;
    * html .topdownload_box {
        margin: 0 15px 10px 7px;
    .topdownload_box span{
        font-weight: normal;
    .title_singer{
        float: left;
        width: 200px;
    /*--- End of Right Column---*/
    /*--- End of Content ---*/
    /* ----- Footer ----- */
    #footer {
        clear: both;
        padding: 15px 0;
        width: 950px;
        margin: 0 10px;
        text-align: center;
        color: #000000;
        background: #6c5b4c;
        text-align: center;
    #footer a{
        color: #000000;
    #footer a:hover{
        color: #cccc66;
    /* ----- End of Footer ----- */
    #container #content #right_column #new_released_section .new_released_box h3 {
        text-align: center;

  • How can i use Button in BEx  7.0

    Dear Folks,
    Could you help me please ..
    In BI 7.0, for BEx analyzer i see we can use button, combo box, analysis grid.
    If i have a requirement like this:
    1. I have sales report, where it has information about sales person.
    2. And i want to filter that report with the sales person that i choose from combo box.
    For that requirement, i tried to :
    1. I Create a query to Sales info-provider for displaying sales.
    2. I Create a query to either to MD Sales person / Sales info-provider in order to get Sales persons data.
    3. I assign point no 1 to Analysis Grid.
    4. I assign point no 2 to Combo box.
    My questions are:
    a. Is my techniques correct ??
    b. How can i use button to execute filter into the corresponding report ???
    c. Is there any tutorial regarding this ?? Could you share it to me please ..
    Really need your guidances..
    regards,
    Niel..

    Hi Niel,
    You can use the method you specified.
    In Bex Analyzer you have design mode where you can have the following items Button, Analysis Grid and Combo box.
    To work with the button you need to use the Command Wizard which consists of pre-defined functions, out of those select the one which suits your requirement and supply the parameters. As it is done thorugh a Wizard it would be easy to do.
    Also,
    The Button Name displays the name of the button, which is generated automatically and is unique. This name is used on the BEx Analyzer Design Toolbar menu to refer to a particular instance of the button.
    · Range u2013 Manipulate coordinates for a cell or cells in this field to move or resize the button.
    · Button Text - The text (caption) you want to display on the button. You can use this to describe the command the button executes.
    · Command Range (optional) - Specify a three-column range of cells in the worksheet that contains command parameters. In these cells, you provide the same parameters (Name, Index, and Value) as in the Static Parameters, but in the worksheet these can be variable, changing during
    navigation based on query results or on a value you manually specify.
    Button in Bex analyzer
    Regards,
    Neelesh Jain.

  • How to resize photos in iPhoto?

    Hi
    I can seem to figure out how to resize my photos so I can send them via email or just make them smaller in general. Any suggestions?

    What is your email client? If you use Mail, Eudora, Entourage or AOL then just select the photo you want to email and click on the Mail button. You'll be presented with a menu to choose the size of the file to attach to the email.
    If you are using a web based email you'll have to export the files to the Desktop via the File->Export->File Export menu option where you'll be able to set the file size and quality level of the files.
    See TD's treatis on file access on ways to access the photos for use outside of iPhoto.
    Do you Twango?

  • ??  How to resize in Photo Shop Express

    I've been on hold for two 30 minutes sessions to find out how to get out of Photo Shop Express.
    All I want to do is resize a picture. It comes up, but I can't figure out how to resize. So, I really want to
    get out of Photo Shop Express and go to another product unless someone can help. me.
    thanks

    Hi Ann
    Sorry for the difficulties.  In case it's not too late, here are some steps for accessing our online Editor's image resize tool:
    1. If you are already a member of Photoshop.com, sign in your account.  You can access you account at either www.photoshop.com or http://www.photoshop.com/tools/organizer
    2. If you are a member, and have not already uploaded your photo to you online account, please do so. Look for the 'Upload' button at the top right of the Photoshop Express Online Organizer (http://www.photoshop.com/tools/organizer).  Select your image, and click the Edit button at the bottom of the Window.
    If you are not a member, you can still access our online Editor at this URL:  http://www.photoshop.com/tools?wf=editor   Just go to this page and upload your photo to begin editing it.
    3. Once you have your image open in the Online Editor, find the 'Resize' button on the left next to our other editing tools.  Then choose the resize settings you like and click 'Save' when you're done.

  • How to resize photoshop elements 11 window on mac? no green+

    How to resize photoshop elements 11 window on mac? no green+ button as off screen.  cannot rescale monitor - no option on macpro

    Go to system prefs>displays and set your resolution way down. Let OS X open with the new resolution. Then set it back up to the highest available resolution and the window should position itself correctly.

  • DVD studio pro how to resize background picture

    DVD studio pro how to resize background picture? I want my photo be a background but cant find how to resize it to fit the screen.

    Hi Miron,
    You are best off taking the image into Preview or Photoshop and resizing it to match your framesize. You could use a button and resize that but it is not economical or pretty.
    Pi

  • How can I rename buttons in dialog popup ?

    Hello.
    I want rename buttons "OK", "Cancel" with my names in popups.
    I create new values in domen WDR_POPUP_BUTTON_KIND
    Next enhance interface IF_WD_WINDOW with new attributes:
    CO_BUTTON_CP type WDR_POPUP_BUTTON_KIND
    But i have problem in CL_WDR_INTERNAL_WINDOW->IF_WD_WINDOW~SET_BUTTON_KIND:
      case me->buttons-button_kind.
        when co_buttons_abortretryignore.
          wa_button-button      = co_button_abort.
          wa_button-button_text = cl_wdr_texts=>get_text( '201' ).
          wa_button-tooltip     = cl_wdr_texts=>get_text( '201' ).
          wa_button-is_enabled  = abap_true.
    This code show only predefined type of buttons can use. 
    How can I rename buttons in dialog popup ?

    When you subscribe to button event  you can rename the button
    * Popup
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window(
        window_name          = 'W_POPUP'
        message_display_mode = if_wd_window=>co_msg_display_mode_selected
        button_kind          = if_wd_window=>co_buttons_ok
        message_type         = if_wd_window=>co_msg_type_none
        default_button       = if_wd_window=>co_button_ok
      DATA:  l_api TYPE REF TO if_wd_view_controller.
      l_api = wd_this->wd_get_api( ).
    " subscribe to button event
      lo_window->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_ok
                   BUTTON_TEXT       = u2018Approveu2019 " renaming the button text
                   action_name       = 'ON_OK_POPUP'
                   action_view       = l_api
                   is_default_button = abap_true ).
      lo_window->open( ).
    Radhika

  • I can't figure out how to resize my picture for my home or lock screens.

    I can't figure out how to resize my picture for my home or lock screens. It shouldn't be his difficult. Any suggestions? I'm running the latest software. Thanks.

    whichever app store you are connecting to, hyou need a credit card with an address in that country. Also, itunes gift cards must be in local currency too.
    If you are in japan, you need to use the japan app store

  • How to resize a jpg/gif file to a fix size using jimi ?

    I have search from the web and didn't find any example on doing this.
    Can any one give example on how to resize a jpg image. let say 120x240
    to a fixed size 40x40 ?
    thank you

    Hi.
    When you got that image in form of a file, just load it and invoke the image's getScaledInstance(...)-method.
    Here's how it could work:
    import java.awt.*;
    public class Test {
    public static void main(String[] argv) {
      // define where the image comes from:
      URL toImage = new URL("file:/C:/test.jpg");  // or the like
      // get the image:
      Image image = Toolkit.getDefaultToolkit().createImage(toImage);
      // scale the image to target size (40x40 here):
      Image smallImage = image.getScaledInstance(40, 40, Image.SCALE_DEFAULT);
      // you might want to do other things like displaying it afterwards
    }HTH & cheers,
    kelysar

  • How to remove the buttons in ALV GUI?

    Hi All,
    I am using the FM REUSE_ALV_GRID_DISPLAY for disaplying the ALV grid. i need how to remove these buttons ( mail word processing, loal file, Mail recipient,  ABC analysis, Microsoft Execl and Graphics ) from the ALV Gui?
    please give solution.
    Regards,
    Santha

    hi,
    IT_EXCLUDING TYPE SLIS_T_EXTAB OPTIONAL
    you need to append the Fucntion codes to the it_exclude and then pass it to the parameter it_excluding.
    append '&ABC' to it_excluding.
    append '&BAC' to it_excluding.
    call function 'REUSE_ALV_GRID_DISPLAY'
    IT_EXCLUDING = it_exlcuding
    Regards
    Anver

  • How to handle Back button in IA06 BDC

    Hi all,
    I am calling IA06 inspection screen for an task list operation using BDC from my custom program. on this screen user can change the SAP data. if I save the task list then it's working fine.
    But I have one issue how to control back button, when user make any changes on this screen and click on back button because it calls all the previous screens which i skipped using BDC.
    Or for this particular functionality there is any Function module same as for Characterstics as "CLFM_OBJECT_CLASSIFICATION"
    Please advice.
    Thanks,
    Sanket Sethi

    Hi all,
    Please suggest if there is any function module/ API  to call Task list characteristic screen directly; same as for Task list classification screen using Function module CLAF_CLASSIFICATION_OF_OBJECTS.
    Thanks,
    Sanket Sethi

  • How to use one button rollover symbol to create 100 graphically different buttons

    I do know how to create a button rollover symbol.
    I don't know how to make that button rollover symbol reuseable. I'd like to put 100 different images in 100 copies of the button. I'd rather not make new symbols for every button, since the rollover animation may change.
    Symbol "Accessibility" allows the title to be changed for copies of the symbol. Does similar functionality exist for bitmaps used in the symbol?
    Could the copied button bring in new graphics from the timeline in another symbol or a xml sheet?
    Any help would be greatly appreciated. I've been following tutorials, except none of them cover this situation.
    Thanks for your help!

    Created in EA version 3:
    I have 2 samples for you that are very similar.
    1- uses the symbol with no image and loads the image as a background-image for the div.
    https://app.box.com/s/co7uki3fm3b11a3o1xjw
    2- uses an image in the symbol and replaces this image with a new one in the img (not div)
    https://app.box.com/s/3ms92f5cv0mylspsi5uo
    Choose what you prefer.
    3. An example with more elements in the symbol directly on the stage instead of a container. use a container if you want to place the symbols in a specific rectangle div for example.
    https://app.box.com/s/y92bpo82kncxnn2w567y

  • How to resize a table in Pages 5?

    How to resize a table in Pages 5? It can be resized vertically but not horizontally.

    stuart13 wrote:
    How to resize a table in Pages 5? It can be resized vertically but not horizontally.
    The controls are in the Format panel, Arrange Tab.
    Jerry

Maybe you are looking for