Also, all I want help with is getting the program to compile and populate the form. Everything else I can work on at a later time so please don't rip the code for being horrible I'm still a beginner.
Thanks
import javax.swing.JOptionPane; import java.awt.*; import java.awt.event.*; import java.util.Random; public class SkydiveSimple extends Frame implements ActionListener { int counter, random; int count = 0; int points = 0; int[] formation = new int[5]; Panel formationPanel = new Panel(); TextArea formationDisplay[] = new TextArea[5]; //There can be no more than five formations generated Panel buttonPanel = new Panel(); Button generateButton = new Button("Generate Set"); public void Output() { //set layouts for frame and panels this.setLayout(new BorderLayout()); formationPanel.setLayout(new GridLayout(1,5,10,10)); buttonPanel.setLayout(new FlowLayout()); //add components to set panel for(int counter=1; counter<4; counter = counter + 1); { formationDisplay[counter] = new TextArea(null,3,5,3); formationDisplay[counter].setText("" + formation); formationDisplay[counter].setEditable(false); formationPanel.add(formationDisplay[counter]); } //add components to button panel buttonPanel.add(generateButton); //add panels to frame add(buttonPanel, BorderLayout.SOUTH); add(formationPanel, BorderLayout.CENTER); generateButton.addActionListener(this); } public void actionPerformed(ActionEvent e) { while(points > 5) { Random generator = new Random(); random = generator.nextInt(31) + 1; formation[count] = random; if (random < 27) points = (points + 2); else points = (points + 1); } } public static void main(String[] args) { SkydiveSimple f = new Output(); f.setBounds(200, 200, 600, 300); f.setTitle("Skydive Simple"); f.setVisible(true); } }