A button that opens a window?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BMD
    New Member
    • Nov 2007
    • 6

    #1

    A button that opens a window?

    I'm new to this language so please be nice.
    Now can I have a button display two numbers one static and one from a file, and when the button is clicked it opens a new window with .xls file data in it?

    What I'm trying to build is a little apt that will display an account number and the balance in the account stored in a file displayed on the button. Once the button is clicked it will load a new window with the data from a different file in it, list the log of each transaction.

    Basic code is what I'm looking for I would like to modify the code to learn the language, but working code so I can see what effects my changes has on the program.

    Thank You So Much,
    BMD
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by BMD
    I'm new to this language so please be nice.
    Now can I have a button display two numbers one static and one from a file, and when the button is clicked it opens a new window with .xls file data in it?

    What I'm trying to build is a little apt that will display an account number and the balance in the account stored in a file displayed on the button. Once the button is clicked it will load a new window with the data from a different file in it, list the log of each transaction.

    Basic code is what I'm looking for I would like to modify the code to learn the language, but working code so I can see what effects my changes has on the program.

    Thank You So Much,
    BMD
    Hi, google for "Sun Java Tutorials". Sun has a great set of tutorials (including source
    code) available. Pay special attention to the Swing tutorials; there's all in there and
    a lot more. I can't give you a link now, we had a fine repository available for posters
    but it's sort of lost now. I apologize; you have to google for the link.

    kind regards,

    Jos

    Comment

    • BMD
      New Member
      • Nov 2007
      • 6

      #3
      Thanks for the quick reply,
      I have accessed the site and there is a lot of information here. Lots of reading and I did find one code bit but lots of digging to do.

      Is what I'm trying to do able to work in java.

      I would like to have in the an apt that when loaded it displays the balances in accounts and when click will load a transaction file and if a + or - is clicked next to the account button it will add or subtract the amount from the balance. Kind of short but something to learn on.

      Thanks, again.
      BMD

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Read a bit more: there's a lot of example code in there. Maybe it doesn't exactly
        fit your needs but if you want to learn and study how everything works you can
        write your own perfect solution. You don't want to copy and paste something to
        your computer that you don't (quite) understand do you?

        kind regards,

        Jos

        Comment

        • BMD
          New Member
          • Nov 2007
          • 6

          #5
          Originally posted by JosAH
          You don't want to copy and paste something to
          your computer that you don't (quite) understand do you?
          Not really but that is how I learned VB, and I am a hands on person I like to see the changes I made and the effects on the program.
          Still reading,
          BMD

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by BMD
            Not really but that is how I learned VB, and I am a hands on person I like to see the changes I made and the effects on the program.
            Still reading,
            BMD
            Good; happy reading. If you know the Java language already you can move straight
            on to the Swing tutorials. You seem to want a JFrame and one or more JButtons.
            The next step is to understand how ActionListeners work, coupled to your buttons.
            Forget about those excel files for the moment; if you manage to have an up and
            running frame and button in your application: hats off to you.

            kind regards,

            Jos

            Comment

            • BMD
              New Member
              • Nov 2007
              • 6

              #7
              Originally posted by JosAH
              If you manage to have an up and running frame and button in your application: hats off to you.
              Well I have that partly borrow code from a calculator, I used a jpanel not a jframe, now I need to replace the numberListener (from the calculator) with an open command to open the file. I also need to add four more buttons to add and subtract from the total.

              This is almost fun....
              BMD

              Comment

              • JosAH
                Recognized Expert MVP
                • Mar 2007
                • 11453

                #8
                Originally posted by BMD
                This is almost fun....
                BMD
                Yep, it can be when you apply the right attitude; please do so.

                kind regards,

                Jos

                Comment

                Working...