I need help position a bunch of things. Mostly the text bar.
Here's my code:
package swingHW2;
import java.util.Scanner;
import javax.swing.*;
import java.awt.*;
public class swingHW2 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
// The Layout
FlowLayout lout = new FlowLayout();
// The Frame AHAHAHAHA!
JFrame frame = new JFrame();
// Frame Options
frame.setTitle("Flash Cards Creator v0.5");
frame.setSize(500,500);
frame.setVisible(true);
frame.setLayout(lout);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Labels
JLabel label1 = new JLabel("Hi");
// Text Field
JTextField tf1 = new JTextField(10);
tf1.setText("Enter Deck Name");
// Adding GUI Components
frame.add(tf1);
frame.add(label1);
}
}
Please Help!