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?
Type: Posts; User: havinFun
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?
ok I added in print statements
public void actionPerformed( ActionEvent e)
{
System.out.println("c" + c);
System.out.println("c" + c.finalMatrix);
...
now I am getting this error:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at MatrixGUI$MyButtonListener.actionPerformed(MatrixGUI.java:80)
at...
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...
ok...am I getting closer?
// register the action buttons
calcButton.addActionListener( new MyButtonListener() );
buttonPanel.add( calcButton );
}
private class MyButtonListener...
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()...
Am I on the right track?
private class MyButtonListener implements ActionListener
{
public MyButtonListener()
{
}
public void actionPerformed(...
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...
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...
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?
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...
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...
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...