Please add stats/appearances to buttons...

I ran in to a frustrating problem well building a page. The page has a MSO with 15 states in it. I created buttons for each state and found that I could not set a active appearance/state for the button so I could not just use 15 buttons to create my page. The only way I could do it was by putting the 15 buttons in to the 15 states and changing there appearance on each state. That all sounds easy tell you do the math and see that now I have to link not just 15 buttons to the correct states but now I have to link 225 buttons to the correct states! All this because I can not create a button with two or more appearances/states. Buttons need to have 3 stats unactive, active and touched so you can set the appearance on each state based on what is going on.
Thanks for reading my wall of text....

Thanks for reading the wall of text. and I am glad it is on the list no matter where it is on the list will make life a lot easior once it gets here.
One more thing why can you not link a button inside a MSO to a second MSO state?
Example MSO1 contains some buttons MSO2 contains some image states. Why can you not link the buttons in MSO1 to the states of MSO2?

Similar Messages

  • Please add a "link" or "share" button to replies / answers for easier referencing and linking.

    Currently, the only ways to link to a specific reply or answer are:
    Hunt through the poster's activity page and look for the link to the post in question, or
    Inspect the post's HTML, extract the ID from the enclosing <li> tag, then manually construct the URL by adding it as an anchor to the top level URL.
    Example: https://social.microsoft.com/Forums/en-US/4fb9d481-741f-49ea-9059-ff1757ead511#b7e0c275-0645-4c3b-a314-480cb89ef04c was
    constructed using method 2. See that link for a discussion related to this topic.
    These both stink. A forum, especially one as full of information and as frequently cited as this one, really ought to have an easier way to link to specific replies.
    Please add a "link" or "share" button (or something similar) that generates a URL that links directly to the post. Perhaps it could go down next to the action links (reply, quote, etc) or over near the vote button.
    If one exists, I apologize but I have not been able to find it (and at least one moderator - the one who replied in the example link I just posted - is also unaware of it). This forum has been around long enough that I'm a bit surprised it does not have
    this yet.
    Thanks,
    Jason

    Sorry,  not possible.
    I want to correct myself. There is an old "hack" that still seems to work, which is to create a link to a file, but instead of pointing it to a file you point it to a folder. But Acrobat only lets you select a folder when you create such a link, so how to do it? Create a Word document with such a hyperlink and then use the PDFMaker plugin to convert the file to a PDF. This side-steps the Acrobat limitation and gives you a link to a folder, which when clicked will open it in Windows Explorer.
    As I said, it's a bit of a hack and it's possible it will stop working if Adobe ever decides to block it, so use it with care.

  • E-pub books: when I click on a book to read it, this message appears:  "This item was originally downloaded with a different user account or Adobe ID. To continue, please add that account."

    I incorrectly replaced the backup for my iPad2 by accident when I tried to retrieve it to my new iPad Air.  It now no longer exists.
    I can still see the icons of the books on Kalahari's reader. (Kalahari is an e-pub bookshop in South Africa.
    When I click on a book to read it, this message appears:  "This item was originally downloaded with a different user account or Adobe ID. To continue, please add that account."
    I know for certain that the Adobe ID (e-mail address) is still correct. See below.  The password seems to be the problem.  This appears to have been changed a few times over the past two and a half years.  Which one? Was hoping Adobe could help. (case number: 0214089318)
    Can anyone please assist me to get back on track, what should I do to open and read my e-pub books again?
    Much appreciated.
    Leon Fisher
    Johannesburg
    South Africa
    [email protected]

    Hi I have the exact same issue.
    Someone please post a solution...

  • When I click on a book to read it, this message appears:  "This item was originally downloaded with a different user account or Adobe ID. To continue, please add that account."

    I incorrectly replaced the backup for my iPad2 by accident when I tried to retrieve it to my new iPad Air.  It now no longer exists.
    I can still see the icons of the books on Kalahari's reader. (Kalahari is an e-pub bookshop in South Africa.
    When I click on a book to read it, this message appears:  "This item was originally downloaded with a different user account or Adobe ID. To continue, please add that account."
    I know for certain that the Adobe ID (e-mail address) is still correct. See below.  The password seems to be the problem.  This appears to have been changed a few times over the past two and a half years.  Which one? Was hoping Adobe could help. (case number: 0214089318)
    Can anyone please assist me to get back on track, what should I do to open and read my e-pub books again?
    Much appreciated.
    Leon Fisher
    Johannesburg
    South Africa
    [email protected]

    Hi I have the exact same issue.
    Someone please post a solution...

  • How do I add State/Province and Country to my drop down list?

    How do I add State/Province and Country to my drop down list?

    Hi Gen,
    My problem is that I'm working with the free version of Form Central - I'm willing to purchase a version.  Earlier in my form I have States as a drop down menu (see below) but can't copy it to make it appear later in the same document. I was trying to avoid recreating the entire form. Any tips on copying or duplicating a field inside a document.
    Best Regards,
    Gina Grant
    ink + thread
    312.970.1106 (p)
    773.435.6474 (f)
    www.inknthread.com
    CPS Vendor #: 98626
    The information contained in this email is confidential, proprietary and may be legally privileged. This email is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, or reproduction is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact ink + thread by e-mail ([email protected]) and destroy all copies of this email.

  • Change state of the button after clicking

    Hi,
    I've got following problem - I have navigation tollbar that
    consits of buttons. The buttons correspond to different pages of a
    content that is shown in Loader. I want the button I've just
    clicked to chage its state - so the button has to be highlighted in
    order to show which page is currently being viewed.
    How can I change the appearance of the button after clicking
    it? There'restates like Up, Over, Down, Hit but if I add one more
    keyframe and than make button.gotoAndPlay(5) while clicking the
    button, nothing happens.
    Thank you in advance,
    Yuri

    yuri82_dortmund wrote:
    > Hi,
    >
    > I've got following problem - I have navigation tollbar
    that consits of
    > buttons. The buttons correspond to different pages of a
    content that is shown
    > in Loader. I want the button I've just clicked to chage
    its state - so the
    > button has to be highlighted in order to show which page
    is currently being
    > viewed.
    > How can I change the appearance of the button after
    clicking it?
    > There'restates like Up, Over, Down, Hit but if I add one
    more keyframe and than
    > make button.gotoAndPlay(5) while clicking the button,
    nothing happens.
    Instead of actual button, use Movie Clips with multiple
    frames and simply send it
    to a frame which simulated DOWN state once pressed.
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • How to add the Date Track Button

    How to add the Date Track Button on a customized Form ?
    1. Profile of Datetrack:Enabled = Yes
    2. All HR Forms includes the Date Trak Button
    3. On the Customized Form "Alter Date Track" can be activated from Menu :Tool --> Alter Date Track.
    I'd Like the Button to appear on button ruller.
    Thanks for help

    Rachel,
    Please review the following notes, it may be helpful.
    Note: 177733.1 - How Date Track Works
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=177733.1
    Note: 169059.1 - Understanding the Flow of Date Track Dates Through the Forms
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=169059.1

  • Please add "resize image before uploading" and "do...

    SOME of us do NOT want to send bothersome, huge images over mobile devices just to share a pointless moment with a friend - or an enemy.
    Wechat already has this AWESOME feature, so maybe Skype should have one too - as it is so cumbersome to go into another program to resize and save an image before sending it.
    Please add a button to have a possibility of sending a low resoluton version of all images and also before downloading an image to check out if it is worth the money and bandwidth.
    Sincerely, The Wrath of Diego

    You can resize some bitmap, or movieClip, etc. to a new size by making a new bitmapData at the desired size and drawing the source into the new bitmapData. When doing the draw use a Matrix to accomplish the scaling. Something like so:
    var newBitmapData:BitmapData = new BitmapData(320, 240);
    var m:Matrix = new Matrix();
    m.scale(newBitmapData.width / originalBitmapData.width, newBitmapData.height / originalBitmapData.height);
    newBitmapData.draw(originalBitmapData, m);

  • How to add a google+ share button to a composition?

    I am working on a little app for which I want to add share buttons.
    I don't have problems adding Facebook share and Twitter buttons, However I cannot find a way to add a Google+ share button.
    For FB I create a rectangle and name it fbBtn. Then on click I add the foolowing code:
    FB.ui({
              method: 'feed',
              name: 'Win designer fashion jewelry from Baloka',
              link: ' http://www.mysite.com/',
              picture: 'http://www.mysite.com/external-xfbml/share-image.gif',
              caption: 'Win designer fashion jewelry from Baloka',
              description: 'Baloka is giving away 22 designer fashion jewelry by Maria Mizrahi. Check this out. Do you want to win? You could...',
              message: ''
    For Twitter I create a rectangle and name it twitterBTN. Then I add this code to document.compositionReady:
    var twitter = sym.$("twitterBTN");
    var c = '<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://baloka.com/content/socialApp/fb.html" data-text="Win cool trendy designer fashion jewelry - check this out" data-via="BalokaDesign" data-count="none" data-hashtags="BalokaSweepstakes">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id =id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(docu ment,"script","twitter-wjs");</script>';
    twitter.html(c);
    For Google + I found two ways to add a share button:
    First:
    Adding this snipped to the html document (not in EA):
    div class="edgeLoad-EDGE-467457915"><a href="https://plus.google.com/share?url={http:baloka.com}" onclick="javascript:window.open(this.href,
      '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><img
      src="https://www.gstatic.com/images/icons/gplus-16.png" alt="Share on Google+"/></a></div>
    and adding this to the head:
    <!-- Add the following three tags inside head. -->
        <meta itemprop="name" content="Baloka Sweepstakes">
        <meta itemprop="description" content="Win designer fashion jewelry by Maria Mizrahi - Baloka.
        There are 22 prizes including earrings, bracelets, necklaces and a couple of $100 gift certificates.
        Please share with your friends.">
        <meta itemprop="image" content="http://cdn2.bigcommerce.com/server2100/a154e/products/102/images/243/LittleTotemEarrings__ 55527.1355162788.1280.1280.jpg">
    This works as expected, but I am having a hard time position the button in the right place on my page. I can see the button in EA, but the position I set it in there is not maintained once the file is published.
    Thus, I would like to know how to include the code directly in EA as I am doing with the Twitter and facebook buttons.
    Second:
    Adding this to the html document (not in EA):
    <div id="gplus1" data-action="share" data-annotation="bubble" class="edgeLoad-EDGE-467457915"></div>
    <!-- Place this tag after the last share tag. -->
    <script type="text/javascript">
          (function() {
                    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                    po.src = 'https://apis.google.com/js/plusone.js';
                    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      </script>
    Again, this works, although with this code I don't know  how to customize the name, description and image for the info I am sharing.
    In this case I was able to include the code on EA adding the following to document.compositionReady:
    var googleplus = sym.$('googleplus');
    var click = "javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');";
    var g = '<a href="https://plus.google.com/share?url={http://baloka.com/content/socialApp/fb.html}" onclick="click";return false;"><img src="https://www.gstatic.com/images/icons/gplus-16.png" alt="Share on Google+"/></a>';
    googleplus.html(g);
    The problem here is that instead of opening a window, it replaces the page with the one supposed to be on a different window, which I don't like.
    So, in short, I need some help figuring out how to include the code directly in EA for the first method for Google+.

    I don't have an answer for you, but I do have a question. You said the FB code works. What did you do? What did you put in your html page? I tried the FB code above and it gives me an ID error. Appreciate it if you can elaborate more. I just posted the ff in the forum "Customizing FB Share in Edge Animate"
    Thank you!

  • Why am I getting this error?  How do I add confirm message to button press?

    Using Java Studio Creator.
    I do not understand why I am getting the following page error:
    Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.
    Exception Details: java.lang.IndexOutOfBoundsException
    Index: 0, Size: 0
    Possible Source of Error:
    Class Name: java.util.ArrayList
    File Name: ArrayList.java
    Method Name: RangeCheck
    Line Number: 546
    ======================================================================
    I have a page that works.
    It has a button that is created in the session bean code with the following java:
    button = (HtmlCommandButton)application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
    button.setActionListener( application.createMethodBinding("#{ScheduleEditSessionBean.mainApply}", new Class[]{ActionEvent.class} ));
    button.setId( "applyUndates" );
    button.setType( "submit" );
    button.setTitle( "Apply updates.");
    button.setValue( "Apply" );
    button.setStyle(style);
    children.add(button);
    When the button is pushed, it calls the following session bean method:
    public void mainApply(ActionEvent actionEvent)
    updateScheduleData();
    scheduleAdjustFlag = 1;
    dataApplied = true;
    dataSaved = false;
    addControls();
    This all works just fine - no errors
    ====================================================================
    I wanted to add confirmation to the button press, so I removed the action listener for this button and added
    a javascript function call for the onclick method
    button = (HtmlCommandButton)application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
    style = "text-align: center; font-family: 'Arial','Helvetica',sans-serif; " + font + " height: 22px; width: 115px";
    // Commented out this line button.setActionListener( application.createMethodBinding("#{ScheduleEditSessionBean.mainApply}", new Class[]{ActionEvent.class} ));
    button.setOnclick("confirmApply()"); // Added this line.
    button.setId( "applyUndates" );
    button.setType( "submit" );
    button.setTitle( "Apply updates.");
    button.setValue( "Apply" );
    button.setStyle(style);
    children.add(button);
    I added a dummy button to the page that has the following call to execute the mainApply method in the sessioon bean.
    The button action just calls the mainApply() method in the session bean
    public String mainApplyBtn_action() {
    seb.mainApply();
    return null;
    Added the javascript to the page that simply pushes the dummy button if confirmed.
    function confirmApply()
    if( confirm( 'Are you sure you want to Apply these changes?' ) )
    form1["form1:mainApplyBtn"].click();
    The session bean method looks like this it is the same method as before, but without the action event argument.
    public void mainApply()
    lsb.logMsg( "<ScheduleEditBean.mainApply> Main apply pushed" );
    updateScheduleData();
    scheduleAdjustFlag = 1;
    dataApplied = true;
    dataSaved = false;
    addControls();
    ==================================================================================
    Now, when I push the original 'Apply' button, I get the confirmation box just like I expected.
    But when I confirm the question, I get the error at the top of this post.
    If I push the 'dummy button' directly, I do not get the error.
    I do not understand why I should be gettng this error.
    Can anyone give me a clue as to why this change would cause the problem?
    The error is related to an ArrayList.
    I use several of these on the page, but they should be filled with data in the preRender method of the page.
    Can anyone suggest a way that I can add confirmation to a button that is created under program control?
    Thanks

    Make use of the fact that when an onclick event of a button returns 'false', the action will not be taken.
    Pseudocode:<h:commandButton value="submit" action="#{myBean.action}" onclick="return confirm('Are you sure?');" />

  • OK since midday today firefox 3.6.24 apparently no longer executes javascript on ebay. Can't use the "add to watch list" buttons or the enlarge photo buttons. It says 'javascript at the bottom of the firefox window but nothing happens.

    just as I wrote above.. ebay loads and functions. I can bid and view auctions but trying to either use the "add to watch list" or "add to wish list" buttons or to switch between different posted photos of an item just gives me javascript:; at the bottom left of my screen but clicking the button has no effect.I'm still running 10.4.11 with the last java download.. is this an ebay change to a newer java version not supported by my os or is it a firefox error..oh and one more thing each page seems to have become 4 times longer..ie there is a huge empty space as I scroll down the page before I hit the bottom.Only appears to do this on ebay..haven't found any other sites showing similar errors and everything works fine on my imac running firefox 4 under 10.5

    Craig Stenton: at 12:13:04
    but I can't install windows! During the install I am asked for the product key and it tells me that it is not valid and so I can't proceed.
    Craig Stenton: at 12:14:16
    I can't use the usual methods of activation because I cannot get an activation code. I can't use the activation wizard. I can't call the number because it requires an activation code.
    Hi,
    I'm a bit confused with this paragraph, as you said Vista already install on your computer, why did you say Windows can't be installed?
    According to your description with your problem, it is Product edition and key are not match. Firstly of all, we must make sure the system you installed on your computer was
    Windows Vista Business, not matter 32 or 64 bit.
    Note: you can check current system edtion at System Properties.
    After that, you can try to input your product key and activate your system for test.
    If problem still presists, it would be better to provide the activation error message.
    Roger Lu
    TechNet Community Support

  • Is it possible to capture the state of a button outside of capturing events?

    I was wondering if there was a way in Flex to determine the state of a button (i.e. up, down, over, selected, etc..) besides capturing each individual events.  What I am asking is essentially to be able to access the "phase" private member variable of the Button class.  Please advise.

    Actually, nevermind, I was mistaken that the Button.phase parameter was private, it is actually of mx_internal type.  Thanks.

  • How do I add a submit form button to my form?

    I am creating a form in FormsCentral.  How do I add an email submit button, as an object, to the form?

    Hi,
    Please refer to the following forum thread:
    http://forums.adobe.com/message/5797460
    Regards,
    Brian

  • How do I add a full-screen button to mp4 videos?

    I am making a multi-screen HTML 5 help project.  We want to add videos.  Right now the videos are mp4, but really we could convert them to anything.  I want the videos to appear on the page at a nice small specified size.  That I can do.  However, I want the user to be able to expand the video to a boarderless full-screen size, similar to Youtube videos.  I can't find any option to add a full-screen button to the video player.  Can it be done in Robohelp?  Do I have to buy an external video player?
    Thanks.

    Despite the similarity in names, Java and JavaScript are separate languages. For embedding Flash players or controls in web pages, you would be using JavaScript.

  • Please Help - Need Help with Buttons for GUI for assignment. URGENT!!

    Can someone please help me with the buttons on this program? I cannot figure out how to get them to work.
    Thanks!!!
    import java.awt.*;
    import java.awt.event.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.JButton;
    public class InventoryTAH implements ActionListener
        Maker[] proMaker;
        JTextField[] fields;
        NumberFormat nf;
        public void actionPerformed(ActionEvent e)
            int index = ((JComboBox)e.getSource()).getSelectedIndex();
            populateFields(index);
        public static void main(String[] args)
            try
                UIManager.setLookAndFeel(
                        "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            catch (Exception e)
                System.err.println(e.getClass().getName() + ": " + e.getMessage());
            InventoryTAH test = new InventoryTAH();
            test.initMakers();
            test.showGUI();
            test.populateFields(0);
        private void initMakers() {
            proMaker = new Maker[10];
            proMaker[0] = new Maker( 1, "Pens",1.59,100,"Bic");
            proMaker[1] = new Maker( 2, "Pencils", .65, 100,"Mead");
            proMaker[2] = new Maker( 3, "Markers", 1.29, 100,"Sharpie");
            proMaker[3] = new Maker( 4, "Paperclips", 1.19, 100,"Staples");
            proMaker[4] = new Maker( 5, "Glue", .85, 100,"Elmer's");
            proMaker[5] = new Maker( 6, "Tape", .50, 100,"3m");
            proMaker[6] = new Maker( 7, "Paper", 1.85, 100,"Mead");
            proMaker[7] = new Maker( 8, "Stapler", 2.21, 100,"Swingline");
            proMaker[8] = new Maker( 9, "Folders", .50, 100,"Mead");
            proMaker[9] = new Maker( 10, "Rulers", .27, 100,"Stanley");      
          int maxNum = 10;
          int currentNum = 0;
          int currentInv = 0;
             Action firstAction = new AbstractAction("First")
              public void actionPerformed(ActionEvent evt)
                   currentInv = 0;
                   int populateFields;
          JButton firstButton = new JButton(firstAction);
          Action previousAction = new AbstractAction("Previous")
              public void actionPerformed(ActionEvent evt)
                   currentInv--;
                   if (currentInv < 0)
                        currentInv = maxNum - 1;
                   int populateFields;
          JButton previousButton = new JButton(previousAction);
          Action nextAction  = new AbstractAction("Next")
              public void actionPerformed(ActionEvent evt)
                   currentInv++;
                   if (currentInv >= currentNum)
                        currentInv = 0;
                  int populateFields;
          JButton nextButton = new JButton(nextAction);
          Action lastAction = new AbstractAction("Last")
              public void actionPerformed(ActionEvent evt)
                   currentInv = currentNum - 1;
                   int populateFields;
          JButton lastButton = new JButton(lastAction);
              JPanel buttonPanel = new JPanel( );
        private void showGUI() {
            JLabel l;
            JButton button1;
                JButton button2;
            fields = new JTextField[8];
            JFrame f = new JFrame("Inventory");
            Container cp = f.getContentPane();
            cp.setLayout(new GridBagLayout());
            cp.setBackground(UIManager.getColor(Color.BLACK));
            GridBagConstraints c = new GridBagConstraints();
            c.gridx = 0;
            c.gridy = GridBagConstraints.RELATIVE;
            c.gridwidth = 1;
            c.gridheight = 1;
            c.insets = new Insets(2, 2, 2, 2);
            c.anchor = GridBagConstraints.EAST;
            cp.add(l = new JLabel("Item Number:", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('a');
            cp.add(l = new JLabel("Item Name:", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('b');
            cp.add(l = new JLabel("Number of Units in Stock:", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('c');
            cp.add(l = new JLabel("Price per Unit: $", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('d');
            cp.add(l = new JLabel("Total cost of Item: $", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('e');
            cp.add(l = new JLabel("Total Value of Merchandise in Inventory: $", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('f');
            cp.add(l = new JLabel("Manufacturer:", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('g');
            cp.add(l = new JLabel("Restocking Fee: $", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('h');
                c.gridx = 1;
            c.gridy = 0;
            c.weightx = 1.0;
            c.fill = GridBagConstraints.HORIZONTAL;
            c.anchor = GridBagConstraints.CENTER;
            cp.add(fields[0] = new JTextField(), c);
            fields[0].setFocusAccelerator('a');
            c.gridx = 1;
            c.gridy = GridBagConstraints.RELATIVE;
            cp.add(fields[1] = new JTextField(), c);
            fields[1].setFocusAccelerator('b');
            cp.add(fields[2] = new JTextField(), c);
            fields[2].setFocusAccelerator('c');
            cp.add(fields[3] = new JTextField(), c);
            fields[3].setFocusAccelerator('d');
            cp.add(fields[4] = new JTextField(), c);
            fields[4].setFocusAccelerator('e');
            cp.add(fields[5] = new JTextField(), c);
            fields[5].setFocusAccelerator('f');
            cp.add(fields[6] = new JTextField(), c);
            fields[6].setFocusAccelerator('g');
            cp.add(fields[7] = new JTextField(), c);
            fields[7].setFocusAccelerator('h');
            c.weightx = 0.0;
            c.fill = GridBagConstraints.NONE;
              cp.add(firstButton);
              cp.add(previousButton);
              cp.add(nextButton);
              cp.add(lastButton);
                          JComboBox combo = new JComboBox();
            for(int j = 0; j < proMaker.length; j++)
                combo.addItem(proMaker[j].getName());
            combo.addActionListener(this);
                cp.add(combo);
                cp.add(button1 = new JButton("   "), c);
            f.pack();
            f.addWindowListener(new WindowAdapter()
                public void windowClosing(WindowEvent evt)
                    System.exit(0);
            f.setVisible(true);
      private void populateFields(int index) {
            Maker maker = proMaker[index];
            fields[0].setText(Long.toString(maker.getNumberCode()));
            fields[1].setText(maker.getName());
            fields[2].setText(Long.toString(maker.getUnits()));
            fields[3].setText(Double.toString(maker.getPrice()));
            fields[4].setText(Double.toString(maker.getSum()));
            fields[5].setText(Double.toString(maker.totalAllInventory(proMaker)));
            fields[6].setText(maker.getManufact());
            fields[7].setText(Double.toString(maker.getSum()*.05));       
    class Maker {
        int itemNumber;
        String name;
        int units;
        double price;
        String manufacturer;
        public Maker(int n, String name, double price, int units, String manufac) {
            itemNumber = n;
            this.name = name;
            this.price = price;
            this.units = units;
            manufacturer = manufac;
        public int getNumberCode() { return itemNumber; }
        public String getName() { return name; }
        public int getUnits() { return units; }
        public double getPrice() { return price; }
        public double getSum() { return units*price; }
        public String getManufact() { return manufacturer; }
        public double totalAllInventory(Maker[] makers) {
            double total = 0;
            for(int j = 0; j < makers.length; j++)
                total += makers[j].getSum();
            return total;
    }}

    // I have made some modifications. Please try this.
    import java.awt.*;
    import java.awt.event.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.JButton;
    public class InventoryTAH implements ActionListener
    Maker[] proMaker;
    JTextField[] fields;
    NumberFormat nf;
    int currentInv = 0;
    public void actionPerformed(ActionEvent e)
    currentInv= ((JComboBox)e.getSource()).getSelectedIndex();
    populateFields(currentInv);
    public static void main(String[] args)
    try
    UIManager.setLookAndFeel(
    "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    catch (Exception e)
    System.err.println(e.getClass().getName() + ": " + e.getMessage());
    InventoryTAH test = new InventoryTAH();
    test.initMakers();
    test.showGUI();
    test.populateFields(0);
    private void initMakers() {
    proMaker = new Maker[10];
    proMaker[0] = new Maker( 1, "Pens",1.59,100,"Bic");
    proMaker[1] = new Maker( 2, "Pencils", .65, 100,"Mead");
    proMaker[2] = new Maker( 3, "Markers", 1.29, 100,"Sharpie");
    proMaker[3] = new Maker( 4, "Paperclips", 1.19, 100,"Staples");
    proMaker[4] = new Maker( 5, "Glue", .85, 100,"Elmer's");
    proMaker[5] = new Maker( 6, "Tape", .50, 100,"3m");
    proMaker[6] = new Maker( 7, "Paper", 1.85, 100,"Mead");
    proMaker[7] = new Maker( 8, "Stapler", 2.21, 100,"Swingline");
    proMaker[8] = new Maker( 9, "Folders", .50, 100,"Mead");
    proMaker[9] = new Maker( 10, "Rulers", .27, 100,"Stanley");
         int maxNum = 10;
         int currentNum = 0;
    Action firstAction = new AbstractAction("First")
              public void actionPerformed(ActionEvent evt)
                   currentInv = 0;
                   populateFields(currentInv);
         JButton firstButton = new JButton(firstAction);
         Action previousAction = new AbstractAction("Previous")
              public void actionPerformed(ActionEvent evt)
                   currentInv--;
                   if (currentInv < 0)
                        currentInv = maxNum - 1;
                   populateFields(currentInv);
         JButton previousButton = new JButton(previousAction);
         Action nextAction = new AbstractAction("Next")
              public void actionPerformed(ActionEvent evt)
                   currentInv++;
                   if (currentInv >= maxNum)
                        currentInv = 0;
              populateFields(currentInv);
         JButton nextButton = new JButton(nextAction);
         Action lastAction = new AbstractAction("Last")
              public void actionPerformed(ActionEvent evt)
                   currentInv = maxNum-1;
                   populateFields(currentInv);
         JButton lastButton = new JButton(lastAction);
              JPanel buttonPanel = new JPanel( );
    private void showGUI() {
    JLabel l;
    JButton button1;
              JButton button2;
    fields = new JTextField[8];
    JFrame f = new JFrame("Inventory");
    Container cp = f.getContentPane();
    cp.setLayout(new GridBagLayout());
    cp.setBackground(UIManager.getColor(Color.BLACK));
    GridBagConstraints c = new GridBagConstraints();
    c.gridx = 0;
    c.gridy = GridBagConstraints.RELATIVE;
    c.gridwidth = 1;
    c.gridheight = 1;
    c.insets = new Insets(2, 2, 2, 2);
    c.anchor = GridBagConstraints.EAST;
    cp.add(l = new JLabel("Item Number:", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('a');
    cp.add(l = new JLabel("Item Name:", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('b');
    cp.add(l = new JLabel("Number of Units in Stock:", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('c');
    cp.add(l = new JLabel("Price per Unit: $", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('d');
    cp.add(l = new JLabel("Total cost of Item: $", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('e');
    cp.add(l = new JLabel("Total Value of Merchandise in Inventory: $", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('f');
    cp.add(l = new JLabel("Manufacturer:", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('g');
    cp.add(l = new JLabel("Restocking Fee: $", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('h');
              c.gridx = 1;
    c.gridy = 0;
    c.weightx = 1.0;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.CENTER;
    cp.add(fields[0] = new JTextField(), c);
    fields[0].setFocusAccelerator('a');
    c.gridx = 1;
    c.gridy = GridBagConstraints.RELATIVE;
    cp.add(fields[1] = new JTextField(), c);
    fields[1].setFocusAccelerator('b');
    cp.add(fields[2] = new JTextField(), c);
    fields[2].setFocusAccelerator('c');
    cp.add(fields[3] = new JTextField(), c);
    fields[3].setFocusAccelerator('d');
    cp.add(fields[4] = new JTextField(), c);
    fields[4].setFocusAccelerator('e');
    cp.add(fields[5] = new JTextField(), c);
    fields[5].setFocusAccelerator('f');
    cp.add(fields[6] = new JTextField(), c);
    fields[6].setFocusAccelerator('g');
    cp.add(fields[7] = new JTextField(), c);
    fields[7].setFocusAccelerator('h');
    c.weightx = 0.0;
    c.fill = GridBagConstraints.NONE;
              cp.add(firstButton);
              cp.add(previousButton);
              cp.add(nextButton);
              cp.add(lastButton);
                        JComboBox combo = new JComboBox();
    for(int j = 0; j < proMaker.length; j++)
    combo.addItem(proMaker[j].getName());
    combo.addActionListener(this);
              cp.add(combo);
              cp.add(button1 = new JButton(" "), c);
    f.pack();
    f.addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent evt)
    System.exit(0);
    f.setVisible(true);
    private void populateFields(int index) {
    Maker maker = proMaker[index];
    fields[0].setText(Long.toString(maker.getNumberCode()));
    fields[1].setText(maker.getName());
    fields[2].setText(Long.toString(maker.getUnits()));
    fields[3].setText(Double.toString(maker.getPrice()));
    fields[4].setText(Double.toString(maker.getSum()));
    fields[5].setText(Double.toString(maker.totalAllInventory(proMaker)));
    fields[6].setText(maker.getManufact());
    fields[7].setText(Double.toString(maker.getSum()*.05));
    class Maker {
    int itemNumber;
    String name;
    int units;
    double price;
    String manufacturer;
    public Maker(int n, String name, double price, int units, String manufac) {
    itemNumber = n;
    this.name = name;
    this.price = price;
    this.units = units;
    manufacturer = manufac;
    public int getNumberCode() { return itemNumber; }
    public String getName() { return name; }
    public int getUnits() { return units; }
    public double getPrice() { return price; }
    public double getSum() { return units*price; }
    public String getManufact() { return manufacturer; }
    public double totalAllInventory(Maker[] makers) {
    double total = 0;
    for(int j = 0; j < makers.length; j++)
    total += makers[j].getSum();
    return total;
    }}

Maybe you are looking for

  • RFKORDC1: print program: fbcj receipts - printing out two copies of screen

    Hi, fairly new to sapscript (only attended the SAP training 3 weeks ago) but this one has me baffled already. The business have requested that I modify the output from FBCJ (cash journals for SK) in various ways. I have done this and created a new sa

  • System not signing out or shutting down properly.

    The problem is sometimes (not always) when I shut down my computer (which I recently updated from Windows 8 to 8.1 via Store), or sign out - it hangs. Hangs in the way, that when signing out it keeps showing signing out for 30 minutes, after which I

  • Office 2010 pro 64 bit

    from were can i get office 2010 pro 64 bit media or please provide me link to down load the same

  • Looking for Chicago, IL  area Xcelsius Consultant

    Looking for Chicago-local Xcelsius consultant(s) that can assist in further developing our company's Xcelsius activity dashboards. Beacon Funding Corporation, Attn:  Toby McDonough,  800 866 6396. Thanks

  • Burning a dvd h264 versus pro res 422?

    Hi everyone, I have a "film" project I put together.  It is comprised of many mini scenes and clips.  For each clip I have exported (FCP 6.06) an H264 (720x480) version and a Pro Res 422 (HQ) version.  The Pro Res was better for editing and the H264