Header Ads

Header ADS

J Frame Created in Java

J Frame Created in Java


Let's see a simple swing example where we are creating JFrame object inside the main() method.

J Frame Create Code :


import javax.swing.JFrame;




public class FrameDemo extends JFrame {
    public static void main(String[] args) {
        FrameDemo frame =new FrameDemo();
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
               
        frame.setBounds(200, 50, 400, 300);
               
        frame.setTitle("Frame Demo");
        frame.setResizable(false);
    }
  
}
Output :-

No comments

URI 1070 Six Odd Numbers Solution in C++

URI 1070 Six Odd Numbers Solution in C++ Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just fin...

Powered by Blogger.