import java.awt.EventQueue;

import javax.swing.JFrame;

public class tatat extends JFrame {

	private static final long serialVersionUID = 1L;

	public static void main(String args[]) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					tatat frame = new tatat();
				} catch (Exception e) {

	public tatat() {
		setBounds(100, 100, 500, 375);


I'm new to java. I'm confused on how to bring "public tatat ()" into the main method above without writing a separate statement as shown above? Please advise. Thanks.

What you are saying doesn't make any sense, but you could create a separate class and call the constructor "tatat" inside that class's main method.

But if are not familiar with constructors and using multiple classes from different files in one single main, then you should not been writing swing, even though the NetBeans will auto generate everything for you

As I said I'm new to java, and I don't think it swing is a problem, I'm learning..... anyway thanks for your advise.

> As I said I'm new to java

Then you should try reading the stickies at the top of this forum and get your Java basics cleared up before messing around with complicated stuff like GUI etc.