What is java.awt.Component.getName() used for? It always seems to be null in the applications I build with NetBeans. I\'m thinking of storing some help text p
This is what I use getName() for:
Frame[] frames = JFrame.getFrames();
for (int i = 0; i < frames.length; ++i) {
//get the frame
Frame frame = frames[i];
if (frame.getName().equals(frameName)) {
//make the frame visible
frame.setVisible(true);
//focus the frame
frame.requestFocus();
//found
return;
}
}