Pages

Monday, November 2, 2015

Array of JButton

Assalam-o-alaikum


                                        
                Array of JButton



package myPackage;

import javax.swing.JButton;



public class myClass{



public void buttonArray( ){


JButton[] button=new JButton[3];

button[0].setName("button1");
button[1].setName("button2");
button[2].setName("button3");


panel.add(button);

}

}

No comments:

Post a Comment