JButton cartbutton;
Then invoke the javax.swing.JButton constructor, as follows:
cartbutton = new JButton(''Add to Cart");
This will create a button labeled with the supplied text. It is possible to create an unlabeled button using the constructor JButton(). All the layout examples in Section 8.5 also use buttons.
No comments:
Post a Comment