Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

many new frames

 
Stoyan Georgiev
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So i have a DefaultListModel and when i have a new socket connection to teh server ,some information about the client is added to the List model. After that � wont when i click twise over one of the objec to open a new frame application(chat console)

if(e.getClickCount() == 2){
int index = list.locationToIndex(e.getPoint());
Client client = (Client) StoringData.vector.get(index);

try {
new Console(client);

so far everiting is OK, but when i start >2 Console applications only the last one is active and i cant work with the others.
Any ideas why is like this and any prepositions
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Stoyan Georgiev
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, it is working now.
The secret is(or atleast it's working for me) to invoke method rather than new class. I saw that in your example is also like this.
Thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic