Collection - problem
Hi, I got a program in which after clicking the button the frame is added to the pulpit (frame extend after JInternalFrame);
I'm planning to do something that after clicking that button I will add objects (individual frames) and I want to keep them in collection so i could take out the right one to edit (it's going to be exactly that frame that I will select) Problem is that I don't know how to make it that after cliking the button I can automaticly adddifferent objects of each class (i'm think taht should be different objects but i don't know exactly)
small part of my code:
class MyInternalFrame extends JInternalFrame {
public MyInternalFrame(String title) {
...
}
public String getPlainText() {
...
}
public JTextArea resultText(String plainText) {
...
}
//fields
}
class Main() {
//i create example of collection (or class container - i don't know how should i called it)
ArrayList <JInternalFrame> frames = new ArrayList <JInternalFrame>();
public void AddNewFrame() {
//i want create here a new objects
}
}
PS. I apologise for my english
PS2. I don't mean the running of the button because I got this. I only don't have the way of adding the frame
and the question is: how can i create that different objects
Message was edited by:
thud_Mike

