How to Create a Frame In Java By Swing Platform
Its very easy to create a frame by using Java swing platform in java runtime environment. In this last blog i discus about How to SetUp Java Environment In your PC . This blog i discus about How to Create a Frame In Java By Swing Platform.
- import javax.swing.*;
- public class Simple2 extends JFrame{//To inheriting JFrame
- JFrame f;
- Simple2(){
- JButton b=new JButton("click");//To create button
- b.setBounds(130,100,100, 40);
- add(b);//T0 adding button on frame
- setSize(400,500);
- setLayout(null);
- setVisible(true);
- }
- public static void main(String[] args) {
- new Simple2();
- }}
How to Create a Frame In Java By Swing Platform
Reviewed by Learn Programming
on
12:02:00 PM
Rating:
No comments: