How to change Boardercolor of awt.Button???

Can someone Help me? (I am new and i do not know if in an other thread is an answer posted)
I want to make a Button display in my own colors. As I know in awt.Button there is just the possibility to change the backgroundcolor. But I also need to change the Boarder in thickness and above all in color.
And in addition im not able to use the javax.Swing-Package (If that would help me).
Thx for any help...
Ramon

It is more complex!
When painting a button you usually want to paint it differently according to what I call the state of the button:
Is it enabeled or not?
Is it currently pushed?
Does it have currently have focus?
Is the mouse pointer above it?
The different combination of awnsers to these questions should give you something like 2 to 5 different states that you want to show when painting.

Similar Messages

  • How to change color of a button for specific time interval in jsp

    How to change color of a button for specific time interval in jsp.
    Please help.
    Thanks in advance.

    This was driving me crazy, too--and the previous answers did not seem to work. I eventually found that if I click one of the data symbols in the graph in exactly the right spot (see below), it selects only the data symbols and not the line. I can tell this because the little selection dots will be around each data symbol, but no selection dots will be on the line between the data symbols - like the graphic in Yvan's answer. Then and only then will the color symbol in the tool bar show the color of the data symbol, instead of the color of the line. I believe that you then have to first click on the color swatch in the toolbar and then select your color (or choose Show Colors and select from the color tool). Just clicking a color in the crayon box, for example, did not seem to work unless I first clicked on the color swatch in the toolbar, then clicked Show Colors on that dropdown, and +only then+ clicked the crayon or whatever.
    _The right spot to click_ seems to be just above the exact center of the data symbol, at least for the diamond shape symbol that I prefer. Sometimes it takes several tries to hit the right spot. If I miss it, the whole line is selected, which is indicated by the little selection dots on the line, between the data symbols. When I click the right spot, those selection dots go away, leaving only the data symbols selected. Then I can change the color, as described above.
    I hope this works for you too.

  • HOW TO CHANGE PROGRAMATICALLY LABELS OF BUTTONS AND ...

    I want to do a HTMLDB application is some languages that user choice in web page.
    I have resolve good how to change messages in pages, but I need to know how to change , labels in buttons, reports and in items.
    ¿How I can do this? Change this by program.
    Any help wellcome.
    Thanks in advanced.
    Regards everybody.

    Hi,
    Normally, to translate your entire application you would export the application using Shared Components=>Translation Services. There is documentation on how to do this:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14303/global.htm
    You can also use Shared Components=>Manage Messages to translate individual items. If this is what you want, please let me know and I'll let you know what I did to achieve this.
    Normally, the user would select their preferred language using a browser setting. Do you intend for them to select a language on a page?
    Regards
    Andy

  • How to change the Find Again button in Frame 8

    I'm using FrameMaker 8 with Windows XP Professional. The binoculars icon on the Formatting Bar accesses the Find Next function rather than Find/Change, which is highly annoying and useless because you either get a warning message or it automatically searches for the previously entered item. This is how it came when Frame was installed, I have no idea why.
    How can I get the binoculars icon to function as Find/Change? I tried View > Menus > Modify but it takes me to the Menu Customization File dialog where I'm to select a file and I don't know what to do from there (and can't find any mention of this function in the Help.
    Thanks,
    Tim

    You may be able to remove the emoji button by going to Settings > General > Keyboards and then click Edit and deleting the Emoji keyboard.

  • How to change button colors in a loop?

    I am working on a task that should imitate an elevator. I have two vertical
    rows of round buttons "Up" and "Down" When a circle is selected randomly by
    the program, the circle becomes yellow and the elevator moves to that
    button.
    Here is what I did:
    1. created a class Circle where I save buttons' parameters
    2. saved Circle objects in an array
    3. drew the buttons depending on their parameters
    4. generated a random number, matched it with an array index and assigned
    the object color to yellow.
    Everything is fine except that I can't figure out how to change colors of my
    buttons in a loop.
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    public class Elevator3 extends JPanel
    private int n = 40;
    private int width = 200;
    private int floors = 10;
    private int interval = 1000;
    private boolean selected = false;
    private Circle[] buttons = new Circle[2*(floors-1)];
    public Elevator3()
    build();
    JFrame frame = new JFrame("Elevator3");
    setBackground(Color.WHITE);
    setFont(new Font("SansSerif", Font.PLAIN, Math.round(n/3)));
    frame.getContentPane().add(this);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(width, n*(floors+2) );
    frame.setVisible(true);
    public void build()
    Random r = new Random();
    int buttonPick;
    int timeUntilNextButton = r.nextInt(interval);
    for (int k =0; ; k++)
    if (timeUntilNextButton-- ==0)
    buttonPick = r.nextInt(2*(floors-1));
    //populate my buttons array here - how??
    timeUntilNextButton = r.nextInt(interval);
    //adding "Down" buttons
    for (int i=1, count=0; i < floors; i++, count++)
    if (count == buttonPick)
    selected = true;
    else
    selected = false;
    buttons[count]= new Circle(n*2, n*i, selected, Math.round(n/2));
    //build an array of "Up" circles
    for (int i=2, count=floors-1; i < floors+1; i++, count++)
    if (count == buttonPick)
    selected = true;
    else
    selected = false;
    buttons[count]= new Circle(n, n*i, selected, Math.round(n/2));
    public static void main(String[] args)
    new Elevator3();
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    //draw buttons
    for (int i=0; i < buttons.length; i++)
    g.setColor(buttons.getColor());
    g.fillOval(buttons[i].getX(), buttons[i].getY(), buttons[i].getWidth(), buttons[i].getWidth());
    class Circle
    private int x;
    private int y;
    private Color c;
    private boolean pressed;
    private int width;
    public Circle(int xCoordinate, int yCoordinate, boolean selected, int diameter)
    x = xCoordinate;
    y = yCoordinate;
    pressed = selected;
    width = diameter;
    if (pressed)
    c = Color.YELLOW;
    else
    c = Color.LIGHT_GRAY;
    public Color getColor()
    return c;
    public int getX()
    return x;
    public int getY()
    return y;
    public int getWidth()
    return width;

    hi,
    am sorry, i couldn't make out what exactly the problem, but as ur subject line says...
    may be the code give below will help you to change button colors in a loop..
              for(int i = 0; i < button.length; i++){
                   int color1 = (int)(250*Math.random());
                   int color2 = (int)(250*Math.random());
                   int color3 = (int)(250*Math.random());
                   Color c = new Color(color1,color2,color3);
                   button[i] = new JButton("button name");
                   button.addActionListener(this);
                   //to check the r, g, b combination.
                   //System.out.println(c);
                   button[i].setBackground(c);
                   button[i].setForeground(Color.white);
    //adding into the panel
                   panel.add(button[i]);
    hope this would help you.

  • How to change the text of a button dynamically in module pool

    hi gurus,
    how to change the text of button dynamically

    Hi ,
    Declare a variable in TOP Include with your button name.
    Example : P_BUTTON(20) TYPE C.
    Place button with name P_BUTTON on you screen. Do not forget to mark it as "Output Field". [ Double click on button, Attributes --> Program tab --> tick "Output Field".
    In you PBO / PAI , whereever you want to change your text -
    Assign value to P_BUTTON.
    Example -
    iF COND1..
    P_BUTTON = 'EDIT'.
    ELSEIF COND2.
    P_BUTTON = 'DISPLAY'.
    ENDIF.
    Regards,
    Mohaiyuddin

  • SAP ITSMobile Change Template, size of buttons and dynpros

    Hello Experts,
    I am Using ITS Mobile (ECC 6.0),  i generated the services to my programs, now i want to change the size of the dynpro and buttons, because they are showing in a big format, and we are having to use the scrollbar to see all the screen.
    I followed  the steps to create a generation style, i finished all of them, but now, i don´t know how to change the size of button and the screen.
    This are the steps:
    http://help.sap.com/saphelp_nw70/helpdata/en/46/6c3d6041496a58e10000000a11466f/frameset.htm
    Somebody knows how are the steps to change, the size of buttons, colors, screen size?
    Thanks in advance.
    Alejandro

    Hi,
    Some reference or information about ITS Mobile Templates?
    Thanks in advance.

  • The back button no longer works. I have disabled all add-ons, rebooted & reset the defaults for the browser and nothing has changed. This happens on all webpages.How do I get the back button to light up again?

    the back button no longer works. I have disabled all add-ons,rebooted & reset the defaults for the browser and nothing has changed. This happens on all webpages.How do I get the back button to light up again?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    *Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    Another possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.com/kb/Bookmarks+not+saved#w_places-database-file

  • How to change the fields order by pushing the TAB button?

    Hello.
    I have 4 input fields on a screen that i have build.
    When i'm running the screen, I can move from one field to
    another by the TAB button.
    I need to set a different moving order that is performed by the TAB button.
    For example: the fields are 1,2,3,4. if I use the TAB button to move from one field to another- the order is 1->2->3->4.
    I want it to be 1->3->2->4.
    Is it possible??
    Thanks, Barak.

    Hi Barak Sahar,
    a) set the initial cursor at dynpro level
    b) set the cursor positions dynamically using codeSET CURSOR[/code]
    Here are the online help links I found:
    http://help.sap.com/saphelp_470/helpdata/EN/9f/dbac0b35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_470/helpdata/EN/9f/dba47e35c111d1829f0000e829fbfe/frameset.htm
    Go through below thread...
    How to change the sequence of fields accessed with the tab key on a dynpro;&#56907;
    Hope it will solve your problem
    <REMOVED BY MODERATOR>
    Thanks & Regards
    ilesh 24x7
    Edited by: Alvaro Tejada Galindo on Dec 25, 2007 9:13 AM

  • How to change the button's clicked color

    Dear all,
    How to change the button's clicked color
    I want it to be white in color as my button's background color is white
    Thanks

    How to change the button's clicked colorvia the UIManager

  • How to change shopping cart Buy Now button?

    Hello All,
    I've been racking my brain on this one and could really use some help!
    Check out the "BUY NOW" button on my website here:
    Themes For MuseHome
    How do I get rid of the grey/white color behind the text? (it's grey on one browser, white on another!)
    I want it to be a solid red button and would like the gray area to be transparent.
    I looked in a lot of the css files but can;t figure out which style matches up with this button.
    Does anyone know where I'm supposed to go to change this?
    Any help would be greatly appreciated. Thanks!
    Jason

    Beautiful! That worked. Thanks so much Alex:
    Themes For Muse - Templates for Adobe Muse
    One more question...The same thing is happening to me on another button at the top of the page here:
    Elegant Restaurant Theme
    I tried to amend your code, but I have a hard time understanding this stuff sometimes!
    Any idea how I can give the second button a transparent background?
    Thanks again Alex!

  • HAs anybody noticed how the MAc Book Pro Login button function has changed with OSX 10.9?

    Has anybody noticed how the Mac Book Pro login button function has changed with OSX 10.9?

    No one in this forum will...  this is the Mac Pro forum

  • How to change the TOC button?

    Hi!
    I´d like to change the TOC button. In former versions its simply with four lines on it, with version 8 it´s labeled with "TOC". Can I get the lines back??
    And how do I change the label for bookmarks? (right beside the small bookmark icon it says "title", but I´d like to label it "content" or something else)
    Thanks!

    Still don´t know how to change the label for bookmarks in TOC ...
    But I found the solution for changing the TOC button: somewhere in the program folder are FLA-files for the different skins. Choose the FLA corresponding to your selected skin, open it with Flash and check the library for the button you want to change. Doubleclick in the library and create anew (I changed the "TOC" into three lines). Export SWF and then take care to put it where the original skin SWF is located. Voilá!
    Hopefully someone can tell me a way to change the label ;-)

  • How to change the button size of Calendar prompt

    I want to change the button size in Calendar prompt. How to change it?
    Thank you!

    I think it is not necessary to modify the Calendar button size.
    The Calendar button actual size is 20X20.
    But the gif file which is used by Calendar button is not filled by icon.
    It seems that the height is smaller than the other buttons.
    Edited by: user12291797 on Dec 3, 2009 12:59 AM

  • How to change Topic's Icon and show the Print Button

    Hi, currently i'm using robohelp html version 8. I have spent quite some time to figure out how to change topic's Icon and show the Print Button in my project. Anyone can help me on this? Btw, i using MX(template) to generate the output with FlashHelp Pro.
    Below is the screenshot for clearer clarification:
    Thanks.

    We would have told you if there was.
    Sorry but a downside of FlashHelp is that your customising options are limited.
    See www.grainge.org for RoboHelp and Authoring tips
    Follow me @petergrainge

Maybe you are looking for