I've been working on this for a bit and for the life of me can't get anywhere. I'm trying to set the buttons and labels to set on top of one another rather than side by side. I figure I have to change the layout form FlowLayout to BoxLayout but I can't figure out how to do that. This is what I have so far.
import javax.swing.JFrame;
public class VoteCounter
{
//----------------------------------------------
// Creates the main program frame.
//----------------------------------------------
public static void main(String[] args)
{
JFrame frame = new JFrame("Vote Counter");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new VoteCounterPanel());
frame.pack();
frame.setVisible(true);
}
}
Any help would be greatly appreciated.