I am back and have one or more question(s).
I hope that you can help me
Ok, first i want you to introduce into my problem ^^
What I want:
I want to program a program which can work with a Matrix.
That means it should be able to mulitplicate a 3*3 Matrix with a 3*3 Matrix and so on.
What I have done:
[spoiler]
Code: Select all
package AWT_Programm;
import java.awt.*;
import java.awt.event.*;
public class GUI_Beispiel extends Frame {
//Enable closing of a Window
class CloseWindow extends WindowAdapter {
public void windowClosing (WindowEvent e){
System.exit(0);
}
}
GUI_Beispiel(String title){
super(title);
Button a11 = new Button ("a11");
Button a12 = new Button ("a12");
Button a13 = new Button ("a13");
Button a21 = new Button ("a21");
Button a22 = new Button ("a22");
Button a23 = new Button ("a23");
Button a31 = new Button ("a31");
Button a32 = new Button ("a32");
Button a33 = new Button ("a33");
setLayout(new GridLayout(3,3));
add(a11,0-0);
add(a12,0-1);
add(a13);
add(a21);
add(a22);
add(a23);
add(a31);
add(a32);
add(a33);
}
public static void main(String[] args) {
GUI_Beispiel fenster = new GUI_Beispiel("Matrix Rechner");
fenster.pack();
fenster.setVisible(true);
}
}
What I want (part 2)
I want to make out of the Buttons Elements, where i can type a tnumber in it, so that i can give him a second matrix to do his job .
My question:
How I gonna do it?
Which event do I have to use?
Key or Text Listener?
(I think Text Listener but I am not sure about it)
Gz Bio
Have a nice day!
Advertising