Untitled

mail@pastecode.io avatarunknown
plain_text
a month ago
1.3 kB
3
Indexable
Never
package LabPgm5b;

import java.awt.*;    
import javax.swing.*; 

public class Pgm5b 
{
	JFrame frameObj;    
	Pgm5b()  
	{    
		frameObj = new JFrame();    
		   
		JButton btn1 = new JButton("1");    
		JButton btn2 = new JButton("2");    
		JButton btn3 = new JButton("3");    
		JButton btn4 = new JButton("4");    
		JButton btn5 = new JButton("5");    
		JButton btn6 = new JButton("6");    
		JButton btn7 = new JButton("7");    
		JButton btn8 = new JButton("8");    
		JButton btn9 = new JButton("9"); 
		JButton btn10 = new JButton("10"); 
		JButton btn11 = new JButton("11"); 
		JButton btn12 = new JButton("12"); 
		JButton btn13 = new JButton("13"); 
		JButton btn14 = new JButton("14"); 
		JButton btn15 = new JButton("15"); 
		
		frameObj.add(btn1); frameObj.add(btn2); frameObj.add(btn3);  
		frameObj.add(btn4); frameObj.add(btn5); frameObj.add(btn6);  
		frameObj.add(btn7); frameObj.add(btn8); frameObj.add(btn9);
		frameObj.add(btn10);	frameObj.add(btn11);	frameObj.add(btn12);
		frameObj.add(btn13);	frameObj.add(btn14);	frameObj.add(btn15);

		frameObj.setLayout(new GridLayout(4,4));    
		frameObj.setSize(300, 300);    
		frameObj.setVisible(true);    
	}  
	  
	public static void main(String args[])   
	{    
		new Pgm5b();    
	}    
}