Search:

Type: Posts; User: havinFun

Search: Search took 0.15 seconds.

  1. Re: Matrix multiplying using separate input classes and a GUI

    the value of the finalMatrix should be the resultant from multiplying the two initial matrices together. So I want to pass the resultant to the toString finalMatrix, does that make sense?
  2. Re: Matrix multiplying using separate input classes and a GUI

    ok I added in print statements

    public void actionPerformed( ActionEvent e)
    {
    System.out.println("c" + c);
    System.out.println("c" + c.finalMatrix);

    ...
  3. Re: Matrix multiplying using separate input classes and a GUI

    now I am getting this error:

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at MatrixGUI$MyButtonListener.actionPerformed(MatrixGUI.java:80)
    at...
  4. Re: Matrix multiplying using separate input classes and a GUI

    yes I realize this and I am struggling to get through this class with a decent grade, so I am using my resources to learn from. Thank you for making me feel really stupid here. I am asking for...
  5. Re: Matrix multiplying using separate input classes and a GUI

    ok...am I getting closer?

    // register the action buttons
    calcButton.addActionListener( new MyButtonListener() );

    buttonPanel.add( calcButton );
    }

    private class MyButtonListener...
  6. Re: Matrix multiplying using separate input classes and a GUI

    ok, I tried to add a parameter to the constructor, am I not doing this the right way. I have been trying to follow along with my book too.


    calcButton.addActionListener( new MyButtonListener()...
  7. Re: Matrix multiplying using separate input classes and a GUI

    Am I on the right track?


    private class MyButtonListener implements ActionListener
    {
    public MyButtonListener()
    {

    }
    public void actionPerformed(...
  8. Re: Matrix multiplying using separate input classes and a GUI

    Is this what you are talking about? I am getting an error on this.


    private class MyButtonListener implements ActionListener
    {
    public void actionPerformed( ActionEvent e, String...
  9. Re: Matrix multiplying using separate input classes and a GUI

    I feel like I am making you run in circles.....I am getting an error when I try to add a parameter to the MyButtonListener class stating that I need {} brackets which I have in there already. Adding...
  10. Re: Matrix multiplying using separate input classes and a GUI

    The class that creates that String is the MatrixMult, and by creating a new MatrixMult referencing the toString return, right? And then in the MatrixMult I create a null reference to finalMatrix?
  11. Re: Matrix multiplying using separate input classes and a GUI

    I guess I am really confused now. There is nothing in the new MatrixMult class, but need to reference the toString in the MatrixMult which should hold the results in a String. I am not...
  12. Re: Matrix multiplying using separate input classes and a GUI

    ok, I changed all my variable so that they are not static anymore and renamed the string variable from resultant to finalMatrix....

    I called it to the MatrixGUI, is that correct?

    private class...
  13. Matrix multiplying using separate input classes and a GUI

    I have written code for the Matrix Multiplication GUI and I have set up two classes that build panels Matrix A and Matrix B. I used a toString() method in both classes, but how do I bring both...
Results 1 to 13 of 13