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: Why is it that the product of first N prime numbers + 1 another prime?
Answer: It is not necessarily another prime, but it is most definitely divisible by another prime.

For example, take $2\cdot3\cdot5\cdot7\cdot11\cdot13+1=30031$, which is not prime but divisible by $59$.

It cannot be divisible by any one of those first $N$ primes, so it has to be divisible by some other prime (or possibly, a prime by itself, which also qualifies under the same definition).