Are you kiddin? Well, if you're serious, first take a look at some of the Java APIs, such as JLabel, JPanel, and some language elements.
Then you can do something like (I'm sure my code will not compile)
public static JPanel getLabels(int count) { JPanel panel = new JPanel(new FlowLayout()); for(int i =0; i<count; i++) { panel.add(new JLabel(theFunctionThatCannotBeNamedHere(i))); } return panel; }
Please note that theFunctionThatCannotBeNamedHere is the function you were talking about.
source share