Lets imagine that JFrame containes 9 JTextFields like so:

public static JFrame generateFrame(){
    JFrame frame = new JFrame();
    Container c = frame.getContentPane();
    JPanel panel = new JPanel();
    panel.setLayout(new GridLayout(3,3));
    JTextField[]textFields = new JTextField[9];
    for(int i=0; i&lt;9;i++){
        textFields[i]= new JTextField(1);
        textFields[i].setFont(new Font("Sans-serif", Font.BOLD, 30));
        panel.add(textFields[i]);
    }

    c.add(panel);
    frame.setVisible(true);
    frame.setSize(300,300);

    return frame;
}


So I assign this returned JFrame to variable in main method like so:

    public static void main(String []args){
    JFrame gameFrame = generateFrame(); 
}


Is there anyway to extract all the textfields from "gameFrame" object? Something like docyment.getElementByTagName("element") equivalent in DOM?


Question: Good backup options for Mac pre-TimeMachine
Answer: For free incremental backup on a Mac - or almost any *nix box for that matter - rsync is hard to beat. It should already be installed, and at its simplest will do an incremental copy - set up Launchd or cron to run it automatically at a convenient interval and it'll copy only what has changed over to the backup disk (or a remote machine over the network for that matter).

With a bit of prodding it can even be set up to emulate Time Machine pretty closely, with the exception of the fancy restore interface.