nanashilang / nanash

1 stars 0 forks source link

java-gui-awt-swing #1

Open nanashilang opened 7 years ago

nanashilang commented 7 years ago

package com.java.myapp;

import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel;

public class MyClass extends JFrame {

public static void main(String[] args) {
    MyClass frameTabel = new MyClass();
    frameTabel.setVisible(true);
}

public MyClass() {

    // JFrame Property
    super("ThaiCreate.Com Tutorial Java GUI"); // Title
    setSize(300, 200);
    setLocation(500, 280);

    // Text Label
    JLabel welcome = new JLabel("Welcome to ThaiCreate.Com");
    welcome.setBounds(70, 50, 150, 60);

    // Panel
    JPanel panel = new JPanel();
    panel.setLayout(null);
    panel.add(welcome);

    getContentPane().add(panel);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setVisible(true);

}

}

arpit7714 commented 6 years ago

What is issue

arpit7714 commented 6 years ago

I am interested in solving the issue