Synth L&F -- Multiple Button UI

Does anyone know if it's possible to create a SynthLookAndFeel from file and be able to use different images for one component
As an example I would have 3 different buttons on screen and I would have 3 different PNG images. I want button 1 to be painted as PNG 1, button 2 to be painted as PNG 2 and button 3 to be painted as PNG 3.
Thanks for any help.

Hm, I don't know what you are doing really - but a guess is that you have to make the background opaque?
If your case is analogous, consider
JLabel someLabel = new JLabel("Text");
someLabel.setBackground(Color.GREEN);
someLabel.setOpaque(true);

Similar Messages

  • How to use one pop up window for multiple buttons and input fields?

    Hi Experts,
    I have created a pop up window that will be opened from multiple buttons in the same view. There are input fields that the data will be populated from a pop up window.  How can I set up which button that a pop up window is opened from? I also would like to populate the data from a pop up window to the input field next to a clicked button. There are 6 buttons and 6 input fields that share the same pop up window. I would very appreciate your responses.
    Thank you,
    Don

    Hi,
    Try creating 2 context attributes, one in your component controller and the other in the pop-up view. Bind the attribute of pop-up view to the component controller attribute.
    In the main view, on click of every button set a unique code in the controller's context which helps you in identifying the button clicked. Since u have created a binding to the pop-up view attribute the value flows from the controller.
    In the init method of your pop-up view, check the value of the attribute and based on that display which ever UI elements are required.
    Eg:
    On Button 1 click set value "B1", Button 2  value "B2" etc. In the init() of pop-up view u can check the values and perform the required operation:
    if(("B1").wdContext().currentContextElement().getButtonIdentifier()){
    else...{
    Hope this helps you.
    Regards,
    Poojith MV

  • Multiple buttons on a single slide each connecting to a different url

    Using a trial version of Captivate 7.  I have a handful of slides where the customer wants to open different forms via url.  I tried using a button for each link, inserting the url and using the "enter" key for each of the multiple buttons.  Works fine with the mouse but for 508 folks who tab to the URL and hit the enter key ......... I get many instances where the incorrect url is activated.  Is there a way around this without assicning a different shortcut key for buttons where thare are more than one on a single slide?     Thanks

    Welcome to AD!
    Here is an article on using multiple ipods. I suggest method 1 and steer clear of method 3.
    http://support.apple.com/kb/HT1495
    For your point #1, sharing music on same PC between users, put it in a shared library & set permissions as directed here
    http://support.apple.com/kb/HT1203
    For #2, itunes doesn't have the capability to monitor folders for new content. You'll need to get something like the free program 'itunes folder watch'.

  • How to add multiple button/choices in  button choice

    HI all ,
            How to add multiple button/choices in  button choice ?

    Initialize a cluster array (CrsrList type) with as many cursors as you think you would ever need.   Setup your cursors dynamically, then delete the unused cursors (array elements) and then update your CursorList property.
    Message Edited by vt92 on 03-20-2009 04:04 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    cursors.PNG ‏5 KB

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • How prevent simultaneous execution of multiple button threads?

    My AS 3 program has multiple buttons. Users can select one and then immediately select another and this causes 2 threads that collide.  Once one button is executing, I want the other buttons to ignore clicks.
    I've tried using a lock:Boolean to indicate a button is being processed.  Each button checks lock.  My logic is such that when the AS 3 processor detects a locked condition, it abandons execution of that button.  However, surprisingly, it abandons execution only termporarily ... once the the boolean is unlocked, AS 3 comes back and executes the button.
    The problems are twofold:  1)  the first time the 2nd button attempts to execute (by checking lock), when it returns (from checking lock) and attempts to pick up processing where it left off, it seems to forget where it was and does not utlimately complete its task(s); possibly variables have been altered, it is difficult to say.  That is, AS 3 is unable to successfully pickup where it left off on the first button.
    2) the second problem is that AS 3 incorrectly returns to button 2 after the lock condition is cleared.  It persists and will execute that button.
    Can anyone tell me how once one button is selected, the others can be locked out and won't execute??  Multiple threads from these buttons is a problem.
    Thanks in advance.
    Steve @ U Iowa

    dmennenoh - OK.  The downside to that type of solution is that each button has to "know" which other buttons are on the stage at that time, but, yes, that should work.  Do you think turning their visibility off would or would not be as effective as removing the event listeners?  I'm thinking turning visiblity on or off is simpler and simpler to manage.  Thanks for your help.

  • Multiple Buttons in JTable Headers:  Listening for Mouse Clicks

    I am writing a table which has table headers that contain multiple buttons. For the header cells, I am using a custom cell renderer which extends JPanel. A JLabel and JButtons are added to the JPanel.
    Unfortunately, the buttons do not do anything. (Clicking in the area of a button doesn't appear to have any effect; the button doesn't appear to be pressed.)
    Looking through the archives, I read a suggestion that the way to solve this problem is to listen for mouse clicks on the table header and then determine whether the mouse clicks fall in the area of the button. However, I cannot seem to get coordinates for the button that match the coordinates I see for mouse clicks.
    The coordinates for mouse clicks seem to be relative to the top left corner of the table header (which would match the specification for mouse listeners). I haven't figured out how to get corresponding coordinates for the button. The coordinates returned by JButton.getBounds() seem to be relative to the top left corner of the panel. I hoped I could just add those to the coordinates for the panel to get coordinates relative to the table header, but JPanel.getBounds() gives me negative numbers for x and y (?!?). JPanel.getLocation() gives me the same negative numbers. When I tried JPanel.getLocationOnScreen(), I get an IllegalComponentStateException:
    Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    Can someone tell me how to get coordinates for the button on the JTableHeader? Or is there an easier way to do this (some way to make the buttons actually work so I can just use an ActionListener like I normally would)?
    Here is relevant code:
    public class MyTableHeaderRenderer extends JPanel implements TableCellRenderer {
    public MyTableHeaderRenderer() {
      setOpaque(true);
      // ... set colors...
      setBorder(UIManager.getBorder("TableHeader.cellBorder"));
      setLayout(new FlowLayout(FlowLayout.LEADING));
      setAlignmentY(Component.CENTER_ALIGNMENT);
    public Component getTableCellRendererComponent(JTable table,
                                                     Object value,
                                                     boolean isSelected,
                                                     boolean hasFocus,
                                                     int row,
                                                     int column){
      if (table != null){
        removeAll();
        String valueString = (value == null) ? "" : value.toString();
        add(new JLabel(valueString));
        Insets zeroInsets = new Insets(0, 0, 0, 0);
        final JButton sortAscendingButton = new JButton("1");
        sortAscendingButton.setMargin(zeroInsets);
        table.getTableHeader().addMouseListener(new MouseAdapter(){
          public void mouseClicked(MouseEvent e) {
            Rectangle buttonBounds = sortAscendingButton.getBounds();
            Rectangle panelBounds = MyTableHeaderRenderer.this.getBounds();
            System.out.println(Revising based on (" + panelBounds.x + ", "
                               + panelBounds.y + ")...");
            buttonBounds.translate(panelBounds.x, panelBounds.y);
            if (buttonBounds.contains(e.getX(), e.getY())){  // The click was on this button.
              System.out.println("Calling sortAscending...");
              ((MyTableModel) table.getModel()).sortAscending(column);
            else{
              System.out.println("(" + e.getX() + ", " + e.getY() + ") is not within "
                                 + sortAscendingButton.getBounds() + " [ revised to " + buttonBounds + "].");
        sortAscendingButton.setEnabled(true);
        add(sortAscendingButton);
        JButton button2 = new JButton("2");
        button2.setMargin(zeroInsets);
        add(button2);
        //etc
      return this;
    }

    I found a solution to this: It's the getHeaderRect method in class JTableHeader.
    table.getTableHeader().addMouseListener(new MouseAdapter(){
      public void mouseClicked(MouseEvent e) {
        Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
        Rectangle buttonBounds = sortAscendingButton.getBounds();
        buttonBounds.translate(panelBounds.x, panelBounds.y);
        if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){  // The click was on this button.
          ((MyTableModel) table.getModel()).sortAscending(column);
    });

  • Multiple buttons for a given validation

    I want the same validation to be done on the click of two buttons. In the "Conditional Validation Processing", I see we can
    "select a button" which allows us to select only one button.
    How can I select multiple buttons for a given validation?
    Is there a way or do I need to create another validation for the second button.
    Please advice.

    When you submit a page with a button the "request" value is set to the button name (not the displayed button label). After-submit events can check the request using :REQUEST or v('REQUEST') so you can build a condition like:   :REQUEST in ('APPLY','CREATE')..or you can use a built-in condition type that checks the request value like 'Request is Contained within Expression 1'.
    Scott

  • Notes interaction pauses slide that contains multiple buttons

    I have several slides, each with a Notes Interaction. As advised, each of the notes is set to Rest of Project and are not resized.
    On the slides with a Notes Interaction, there are multiple buttons made out of Smart Objects. When a button is clicked, an advanced action causes a certain text caption to appear.
    The problem is that the buttons work UNTIL the Notes Interaction appears on the slide. As soon as the Notes Interaction appears, the slide seems to be paused and the buttons that are supposed to show text captions no longer work.
    I'm hoping that someone can help with a solution to this.
    By the way, this only seems to happy when previewing in HTML web browser.

    Jay,
    I had replied in an earlier thread that you need to have ONLY ONE notes interaction in the entire project - Not on every slide. The interaction is designed to be placed only once inside a project. So, placing it in the first slide of your project and setting 'Rest of Project' on it should cater to your need.
    You can choose slide notes or project based notes in the edit panel of the interaction.
    Marcellus

  • When button pressed: Multiple buttons

    Regarding the 'When Button pressed' condition available in various places (computations, branches, processes, etc), it offers me the option to select exactly one button.
    How can I make it so that I want the thing to fire when either Button 1 or 2 or 3 is pressed?
    Thanks

    Martin - Whenever a page is submitted with a button, the request value is set to a property from the button, either the button name for standard buttons or the request value attribute for item buttons. In either a PL/SQL expression condition or in some of the declarative condition types that look at the request value, you can compare it to a list of values that you're interested in.
    Note that the request value doesn't necessarily tell you which button was pressed. It tells you that some event set the request value. If your page can be submitted with a tab or with javascript that you put somewhere on the page, or if you've given multiple buttons the same request value, it's up to you to prevent ambiguity about the button-to-request mapping.
    Scott

  • Can multiple button actions be implemented by creating just one RFC?

    Hi All,
         I wanted ask a general question "is it possible to create just one RFC for multiple button actions such as delete, insert, search, modify, copy".
       I tried using one RFC for all the above mentioned actions but I wasn't able to consistently get expected results. So, I just want to confirm from SDN forum members that is it a good practice or is it advisible to create individual RFC for each button actions?
    Earlier responses would be much appreciated.
    Thanks
    Uday

    Hi,
    I did not see any problem for that creation on multiple button actions such as delete, insert, search, modify, copy".  These actions depending up on your RFC.
    For Example. Your RFC having Insert and Delete Functionality you can develop these two Actions. i.e is depending upon your requirement and Depending upon you r RFC functionality. That
    RFC donu2019t gave insert, Delete, modify these functionalities no need to create these Actions.
    So there is no restriction for call the RFC Via Actions(buttons)
    Hope this is help full for u
    Regards
    Vijay

  • Set multiple buttons emphasized = true

    Hi, I have a Panel and added many Buttons in it as Children.
    I would like to set multiple buttons with emphasized = true. I
    found, however, if I set one Button emphasized = true, it will set
    all other Buttons emphasized = false automatically. Why?
    Thanks,
    ff

    Hi
    By default emphasized is false for each button.
    for every button add emphasized="true"
    If it not works post the sample code.

  • Trouble building multiple buttons in extension panel

    Any advice as to how to make multiple buttons active and operational in a new extension panel?  New to scripting and struggling here!

    Hi,
    try to post here: Extension Builder 3 (more appropriate Adobe forum) with more details about what you're after.
    Regards
    Davide Barranca
    www,davidebarranca.com
    www.cs-extensions.com

  • How do you scroll multiple buttons/interactive content???

    Hi, I'm having a lot of trouble trying to figure out how to
    make multiple buttons(my content) scroll through the use of an
    invisible scroller that works on rollover. I've figured out how to
    make text and movie clips scroll but not buttons. Please
    help!

    Take a look at this tutorial and see if it helps

  • IPhone SDK - Multiple buttons calling the same IBAction

    Hi,
    Can I call the same action with multiple buttons? I´ve just connected
    the action to the buttons in interface builder, but in the header file
    I can´t use - (IBAction)setOperator: (id)sender; as the parameter to the function, it always crash due to uncaught exception. If I use - (IBAction)setOperator; it
    works, but i can´t differentiate wich button was pressed.
    I don´t know if i can set the (id)sender parameter in the interface
    builder. Can anyone help me?
    Thanks,
    Pitteri

    .h file:
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    @interface CalculatorView : UIView {
    IBOutlet UITextField *txtResult;
    IBOutlet UIButton *btnMult;
    IBOutlet UIButton *btnDiv;
    @property (nonatomic, retain) UITextField *txtResult;
    @property (nonatomic, retain) UIButton *btnMult;
    @property (nonatomic, retain) UIButton *btnDiv;
    - (IBAction)setOperator:(id)sender;
    @end
    .m file:
    #import "CalculatorView.h"
    @implementation CalculatorView
    @synthesize btnDiv, btnMult, txtResult;
    - (IBAction)setOperator:(id)sender{
    //if btnMult pressed
    //bla bla bla
    //if btnDiv pressed
    //bla bla bla
    that´s my code. Hope u can help.
    thanks
    @end

Maybe you are looking for

  • How can I get a list view after selecting "see all"?

    I just updated to iTunes 12.  I've looked on the net for this but couldn't find anything on it. Previously when I searched for something in the iTunes store I'd pick a certain category of media (podcasts, for example).  It would give me the first few

  • How can I read pdf with ebook reader on JounE touch

    How can I read pdf with ebook reader and where could I put the pdf in Journe

  • Repeat output automatically in changes sales order

    HI all,   I need to resend an output ZEDI whenever  the sales order is CHANGED based on customer number, change in quantity, price and rejection code.   The ZEDI output is created when the order is saved.  My thinking is that i would need to write a

  • SES error when doing thru Requistion

    Dear All, We have created a Service PO with planned service line items and with reference to that, PM order created. During PM order creation, a requisition got generated. Using that requisition, in ML81N trying to create SES. But the error appears a

  • HT2513 iCal is duplicating and not deleting: What should I do?

    I performed the softward update for iCal and terrible things have happened. Under all-day events, as soon as I open an event and attempt to add notes, the event (without the accompanying notes) is duplicated. But it will not allow me to delete the du