[java] SWING
How can I make a mutable Jlist? I try to do it and it crashes!
I''m using JDK1.2 under WinNT
import money.*;
#include "cas.h"
uses bucks;
import money.*;#include "cas.h"uses bucks;
What kind of fool wastes time to say such an unuseful answer?
import money.*;
#include "cas.h"
uses bucks;
import money.*;
#include "cas.h"
uses bucks;
import money.*;#include "cas.h"uses bucks;
What do you mean by mutable? I assume you have tried setListData. What errors do you get?
The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran
Opere Citato
The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran
Opere Citato
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson
JList myMutablelist = new JList(new DefaultListModel());
The items within the JLists model can now be changed by the following calls:
String item = "Item";
DefaultListModel dlm = (DefaultListModel)myMutablelist.getModel();
dlm.addElement(item);
dlm.removeElement(item);
Found this surfing. I want my %5.
The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran
Opere Citato
The items within the JLists model can now be changed by the following calls:
String item = "Item";
DefaultListModel dlm = (DefaultListModel)myMutablelist.getModel();
dlm.addElement(item);
dlm.removeElement(item);
Found this surfing. I want my %5.
The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran
Opere Citato
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement