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!

Can someone please help?

Thanks for the link. Now i need help with an error. It says: Syntax error on token(s), misplaced construct(s)
Syntax error token "void", @ expected

Any help?

Do you think people here can read your mind or see over your shoulder? Post your code and the stack trace.

Sorry i've been posting on my nookcolor lately

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.