Snippets Collections
import javax.swing.*;  
public class FirstSwingExample {  
public static void main(String[] args) {  
JFrame f=new JFrame();//creating instance of JFrame  
          
JButton b=new JButton("click");//creating instance of JButton  
b.setBounds(130,100,100, 40);//x axis, y axis, width, height  
          
f.add(b);//adding button in JFrame  
          
f.setSize(400,500);//400 width and 500 height  
f.setLayout(null);//using no layout managers  
f.setVisible(true);//making the frame visible  
}  
}  
bookmark
dashboard

Wed Jan 01 2020 19:00:00 GMT+0000 (UTC) https://www.javatpoint.com/java-swing

#java #howto #interviewquestions #mobile

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension