• Post Reply Bookmark Topic Watch Topic
  • New Topic

glassPane problem  RSS feed

 
Alex Kravets
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a listener for my button that suppose to set glass pane to true when a button is clicked. However, it appears after all the code associated with this button is executed regardless of the fact that glass.setVisible(true); appears on this first line of the listener. Does anybody know why this is happening?
here is the code:
-----------------
moveToGroup.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
glass.setVisible(true);
Vector temp = new Vector();
Object[] obj = null;
obj = storeList.getSelectedValues();
for(int i = 0; i < obj.length; i++){
glass.setVisible(true);
System.out.println("object: " + obj[i].toString());
temp.add(extractStoreNumber(obj[i].toString()));
JListVector = temp;
addchildAction();
}
displayChild();
//storeList.invalidate();
temp.removeAllElements();
}
}
);
thanks,
Alex
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!